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.
[javascript FR] mouse click event
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
-
Dimitar - PDF-XChange
- Site Admin
- Posts: 2731
- Joined: Mon Jan 15, 2018 9:01 am
Re: [javascript FR] mouse click event
Hello Mathew,
Thank you for sharing your feature request with us.
I have forwarded it to our developers for consideration.
We will keep you posted on any progress regarding this feature.
Regards.
Thank you for sharing your feature request with us.
I have forwarded it to our developers for consideration.
We will keep you posted on any progress regarding this feature.
Regards.
-
Stefan - PDF-XChange
- Site Admin
- Posts: 19943
- Joined: Mon Jan 12, 2009 8:07 am
Re: [javascript FR] mouse click event
Hello Mathew,
Our devs told me that there are no plans for us to expose mouse click events through JS in the foreseeable future, sorry!
Kind regards,
Stefan
Our devs told me that there are no plans for us to expose mouse click events through JS in the foreseeable future, sorry!
Kind regards,
Stefan
-
Mathew
- User
- Posts: 859
- Joined: Thu Jun 19, 2014 7:30 pm
Re: [javascript FR] mouse click event
I’ve got some workarounds up my sleeve so we’ll see where they get me. Thank you for considering it
-
Daniel - PDF-XChange
- Site Admin
- Posts: 13023
- Joined: Wed Jan 03, 2018 6:52 pm
[javascript FR] mouse click event
Dan McIntyre - Support Technician
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
[email protected]
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
[email protected]