From 7930f6d16f1885a85f2da48f34e5f0053ef97731 Mon Sep 17 00:00:00 2001 From: JoanaChicau Date: Wed, 10 Mar 2021 17:22:34 +0100 Subject: [PATCH] revised clean code DRAG and RESIZE library --- index.html | 152 ++++++++++++++++++++++------------------------------- 1 file changed, 64 insertions(+), 88 deletions(-) diff --git a/index.html b/index.html index 82443e1..8269314 100644 --- a/index.html +++ b/index.html @@ -81,99 +81,75 @@ - - - - - + + + + + + + + + + + + 'translate(' + x + 'px, ' + y + 'px)'; + + // update the posiion attributes + target.setAttribute('data-x', x); + target.setAttribute('data-y', y); + } + + \ No newline at end of file