Skip to main content
Participant
May 14, 2014
Question

Script to Get/Set viewing area

  • May 14, 2014
  • 1 reply
  • 202 views

I'm just now looking into javascript for Photoshop CS5, so I'll try to make the functionality I need as clear as possible.

I'm working on a script that functions like Paint Tool SAI's Flip Canvas, which retains your relative viewing area after the flip. Say you're working on a 5000 wide x 1000 tall document with a black to white gradient that flows from left to right. If you're viewing the left (black) edge of the document in Photoshop then Flip Canvas, you're now viewing the mirrored right (white) portion of the picture. In SAI, you'd still be viewing the black area (mirrored left) area, and this is the functionality I want. Very handy for checking proportions while painting, as opposed to flipping individual layers/groups.

I need to store and edit the current viewing area of an open PS document, as in the portion of the document you can see/draw on using the Navigator window. None of the Navigator window or Hand tool operations seem to be logged with the Script Listener, and so far I haven't found any documentation on manipulating them with javascript.

Does anyone know how to get/set the values for the viewing area in Photoshop?

Thanks!

This topic has been closed for replies.

1 reply

c.pfaffenbichler
Community Expert
Community Expert
May 14, 2014
I need to store and edit the current viewing area of an open PS document,

As far as I know this is not possible in Photoshop Scripting currently. (edited)

Feel free to make a Feature Request (for introducing this in the AM or DOM code) over at

Photoshop Family Customer Community

A thread on a somewhat related issue (or at least I consider it related) does exist

http://feedback.photoshop.com/photoshop_family/topics/i_need_projects_in_ps