I'm trying to create custom interface buttons for a pdf that displays a large map. I'm using a timer to check the zoom level so I can resize the buttons accordingly. For the user the buttons appear to be of constant size regardless of the zoom level.
My problem is that when the zoom level is high enough the whole map doesn't fit in the screen and when the user scrolls around the map the buttons move out of view. If I could get the screen coordinates I would be able to move the buttons so that they would stay in view. Or if there is another way to achieve this please let me know.
Thanks for the advice,
Instead of doing whatever it is you're doing with the buttons, consider using a custom toolbar button that you create with the app.addToolButton method. When the code is executed in a document, as opposed to a folder-level JavaaScript file, it will create a floating toolbar that cannot be docked and will only be available while the document is opened.
Bookmarks would be another alternative.