Quantcast
Viewing all articles
Browse latest Browse all 84

selection.bounds operation?

I have this simple jsx script where I want to get the bounds of a selection:

 

try

    {

        var s = app.activeDocument.selection.bounds

        alert(s.toSource())

    }

catch(e)

    {

        alert("No selection")

    }

 

It does detect that there is a selection present but does not return that array of x,y coordinates that bounds the selecton.

The alert displays [({}),({}),({}),({})]

all elements of the array are determined to be undefined.

 

Any help is appreciated.

 

Thanks!

 

Ray


Viewing all articles
Browse latest Browse all 84

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>