Skip to main content
hilukasz
Known Participant
May 30, 2012
Question

parent child relationship

  • May 30, 2012
  • 1 reply
  • 973 views

this is more of a abstract question because I think the exection would be relatively easy. But I am trying to figure out how to tell detect if a symbol is within a rectangle vector area. so almost like a parent child relationship in html goes? was thinking about getting top botom left and right of a layer called parent then checking all layers below it (maybe they have "child" naming sceme, so i can match by layer name) if the top bottom left and right are >=/<= the one above it. not sure if there is an easier way someone can suggest? so it is basically detecting if a box is inside another box.

here is a screen shot: http://localhostr.com/files/3SGgh1o/Screen+Shot+2012-05-30+at+7.24.12+PM.jpg

need to detect is symbol1 is within div1 or 2 and same with symbol2

This topic has been closed for replies.

1 reply

CarlosCanto
Community Expert
Community Expert
May 31, 2012

no direct way, the only way is to do it the way you're thinking. Get the bounds of the square, get the bounds of the symbol and compare them.

here's something a did that uses the same principle

http://forums.adobe.com/message/3698088#3698088

Inspiring
May 31, 2012

Carlos, what about your cheat… Make a temp artboard of the rect bounds select the contents and test the selection array for your symbol… I've used this several times and its worked fine most of the time… ( some times issues with non-filled objects )