javascript – css matrix3d, drag element while keeping distortion

Question:

I have been playing with css Matrix3D in this code: http://jsfiddle.net/88Lv8kfp

Now I wanted a point in the middle to drag the element while keeping the distortion, but I don't know how to do it.

So far, the only thing I've managed to do is add a dot in the middle with jQuery, but I don't know how to update its position.

$ ('<div>'). addClass ("pontos centrais")
  .appendTo ('body'). posição ({
    meu: "center",
    em: "center",
    de: elemento
  });

http://jsfiddle.net/88Lv8kfp/1/

Answer:

You can use the jQuery UI with the .draggable() function.

Using $('.box').draggable(); you can move the box and keep the distortion. I would just have to make the circles follow the movement along with the box.

Scroll to Top