[javascript FR] mouse click event

Please post any ideas or requests for new features here for the End User Version of PDF-XChange (printer Drivers)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange, Tracker - Clarion Support, John - Tracker Supp, Support Staff, moderators

User avatar
Mathew
User
Posts: 838
Joined: Thu Jun 19, 2014 7:30 pm

[javascript FR] mouse click event

Post by Mathew »

For a javascript, we can currently get x and y coordinates from doc.mouseX and doc.mouseY. This FR is for a way for javascript to know that the mouse has been pressed (mouseDown/mouseUp). I imagine this could be either as part of doc properties (doc.mouseDown?) or as a property of the event object (event.click?) but there may be a better way (callback function?).

At its most rudimentary, just knowing that the mouse button has been pressed would allow a tool to place markups at a user specified location.

There are a huge number of tools that would benefit from this, including placing custom generated annotations, rotation/scaling/etc of annotations, etc. I've posted some workarounds I came up with (ie drawing placeholder annotations that get replaced), but they are usually very clunky and difficult to control. Knowing both mouseUp and mouseDown would allow a script to know dragging, etc. but just the basic "click" event would open up many opportunities.

This is obliquely related to another (moon shot) FR, but hopefully less expansive, so maybe more possible?

Thank you for your consideration!
Mathew.