Hi All,

I have created symbol "symbol_1" in external file symbols.svg. This symbol 
will access some other symbols available in the same file. 

Now I created one group element (group_1) with 'symbol_1' and 'Rectangle' 
element with added mouse listeners in SVGRoot Element. If I try to move any 
element within the "group_1", I should move whole "group_1". For this, I need 
to get the "group_1" element using tree traversing from clicked element. Is 
there any other way to access "group_1" element without traversing?


Element rect = (Element)actionNode;
  while (rect != null) {
     if (rect.getParentNode() instanceof Element) {
         rect = (Element)rect.getParentNode();
     } else if (rect.getParentNode() instanceof SVGOMUseShadowRoot) {
         SVGOMUseShadowRoot svrr = (SVGOMUseShadowRoot)rect.getParentNode();
         rect = (Element)svrr.getCSSParentNode();
     } else {
         rect = null;
     }
     if (rect.getAttribute("id").startsWith("group")) {
         break;
  }
}

Thanks,
Selva



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to