Dragging SVG elements

I have this function to drag SVG elements around

        function drag(evt) {
          if (selectedElement) {
            evt.preventDefault();
            var coord = getMousePosition(evt);
            transform.setTranslate(coord.x - offset.x, coord.y - offset.y);
          }
        }
        function endDrag(evt) {
          selectedElement = false;
        }

How can I capture the new x/y position and put them in two variables so I can print them out in the console?
Is it coord.x and coord.y?

Yes?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.