From the customer's description, it sounds like the customer just needs to know when the user has moved or resized a mark. And they are currently using the click event, but this is not ideal because it fires after the user moves a mark but also when the user just clicks a mark.
With the existing product functionality, the customer can solve their issue by debouncing the viewer control MarkChanged event, as demonstrated in the code below. We could update the viewer control API to add API to provide more info when the user moves the mouse or drags a mark, but in my view it is not worth making the API more complex, especially since there is already a good solution with the existing API (see below). We already trigger a MarkChanged event (which notifies that the rectangle property has changed), and it seems redundant and overly complicated to also fire a MarkDragged event since we would then have two separate events with similar and overlapping purposes.
var timeout;
var onMarkChanged = function() { // This will only execute when the user stops moving the mark. console.log('mark changed'); };
var debounceMarkChanged = function() { if (timeout) { clearTimeout(timeout); }
The dev team is looking into your request and wanted to know if you could provide your use case so they understand what you are needing to accomplish with a Mark Drag event.
It's possible that our existing API might support it, for example, perhaps the mouse down/move/up events of ViewerControl could be used.
From the customer's description, it sounds like the customer just needs to know when the user has moved or resized a mark. And they are currently using the click event, but this is not ideal because it fires after the user moves a mark but also when the user just clicks a mark.
With the existing product functionality, the customer can solve their issue by debouncing the viewer control MarkChanged event, as demonstrated in the code below. We could update the viewer control API to add API to provide more info when the user moves the mouse or drags a mark, but in my view it is not worth making the API more complex, especially since there is already a good solution with the existing API (see below). We already trigger a MarkChanged event (which notifies that the rectangle property has changed), and it seems redundant and overly complicated to also fire a MarkDragged event since we would then have two separate events with similar and overlapping purposes.
Attachments Open full size
Attachments Open full size