1 Reply Latest reply on May 16, 2013 3:30 PM by Michael L Hale

    docRef.selection.solid?

    mkeatley17 Level 1

      In the Javascript manual there's a property of a selection called "solid"(docRef.selection.solid) that returns true "if the bounding rectangle is a solid", and false if not.

       

      I'm having trouble understanding what this means and how to use it.

       

      I'm trying to determine if a selection is an actual rectangle and I thought this property would help. However, it seems inconsistent.  If I make a square marquee selection, it returns true.  But if save that selection as a channel, then reselect it, it then returns false.

       

      Any info would help.  Thanks.

        • 1. Re: docRef.selection.solid?
          Michael L Hale Level 5

          The solid property should tell you if the selection has one contiguous border or not.

           

          Perhaps the feather of the selection when made, the image bit depth, or resolution comes into play with the save/load seletion as channel. A quick test here with a zero feather selection in a 16bit 300ppi image returns true even after the selection has been saved then loaded.