Legend
July 27, 2025
Answered
How can I find the leftmost image in sel[j].geometricBounds?
- July 27, 2025
- 1 reply
- 149 views
When selecting multiple images, the leftmost image may not necessarily be the first in the array.
It could be the topmost image.
I guess that sel[j].geometricBounds[1] has the smallest value, which is the leftmost image visually. I want to use it as a reference and get its geometricBounds[1] value.
I now need to find the leftmost image among three images. How should I write the code?
Thnaks.
var sel = app.documents[0].selection;
for(i=0;i<sel.length;i++){ .
. . . . .
var leftmost = (sel[i].geometricBounds)[1];
}
