ActivePresenter Saola Animate Pricing Download

Finding left and top postition of a shape after a drag and drop

Problem: I would like to find the left and top position of a drag and drop object after the shape has been moved, but the functions .left() and .top() only return the position the shape started at

ActivePresenter Version: 7.5.8

OS: Win 10

Notes: -

Hi Scott,

You can use .translate() function to get the dragged distance (relative to the original position):

  var dragObject = prez.object('object name');
  var dragDistance = dragObject.translate();
  var left  = dragObject.left() +  dragDistance.translateX;
  var top = dragObject.top() +  dragDistance.translateY;

Regards

That’s great, many thanks