Skip to content
Advertisement

Tag: move

Move (drag/pan) and zoom object (image or div) in pure js

I’m working on a little script that makes an object (div or img) moveable and zoomable within a given frame. However I came across a few problems I’m not really sure of, because I’m a javascript beginner – so explanation of why those problems occure would be appreciated. Problems: Calling the functions start_drag(), while_drag() and stop_drag() returns undefined – why

Moveable/draggable

This is my updated and modified script, it works completely, except I would like to universalize it… observe the **** how can I make it so that I don’t have to do function(e){BOX.Draggable.elemen = e.target || e.srcElement; elementDraggable(e); everytime I need to use the dragable function for a different element? Answer Is jQuery an option for you? It makes what

Advertisement