Legend
Jul 27, 2025 11:13 AM UTC
Answered
How can I find the leftmost image in sel[j].geometricBounds?
- 2 replies
- 162 views
- Translate
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];
}
