From 12b568b4d98298bc89feebf556e093ffd28ed595 Mon Sep 17 00:00:00 2001 From: Andinus Date: Tue, 26 Oct 2021 11:27:24 +0530 Subject: Tidy --- src/algorithms/2d-transformations/Translation.svelte | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/algorithms/2d-transformations/Translation.svelte b/src/algorithms/2d-transformations/Translation.svelte index 0416f2b..2fcb56e 100644 --- a/src/algorithms/2d-transformations/Translation.svelte +++ b/src/algorithms/2d-transformations/Translation.svelte @@ -3,8 +3,9 @@ import Plotly from "plotly.js-basic-dist-min"; let points = []; - let newPoint = {x: 0, y: 0}; + let translatedPointsArray = {x: [], y: []}; + let newPoint = {x: 0, y: 0}; let translate = {x: 0, y: 0}; function addPoint() { @@ -22,7 +23,7 @@ function deletePoint(id) { points = points.filter(item => item.id !== Number(id)); } -let translatedPointsArray = {x: [], y: []}; + function translatePoints() { // Reset values. @@ -107,11 +108,11 @@ let translatedPointsArray = {x: [], y: []}; {/each} +

Translation Points

- -- cgit 1.4.1-2-gfad0
x y