Select to view content in your preferred language

Changing internal SVG path created by lineSymbol

2929
0
11-28-2015 11:15 PM
omega_cancer
Frequent Contributor

LineSymbols are maintained by JS API as SVG path tags internally.

This statement

graphic._shape.rawNode

returns

<path fill="none" fill-opacity="0" stroke="rgb(255, 0, 0)" stroke-opacity="1" stroke-width="10" stroke-linecap="round" 
stroke-linejoin="miter" stroke-miterlimit="5" path="M 70,273 276,26" d="M 70 273 276 26" stroke-dasharray="none"
 dojoGfxStrokeStyle="solid"></path>

if I change stroke-width to 20 by

graphic._shape.rawNode.setAttribute("stroke-width",20);

It retains the change upon zoom ins and outs but if I change path and  with different values it does not retain its value upon zooms.

It changes to new value and reflects changes on shape but upon zoom it falls back to original value and shape.

How can I change its value so that I can draw complex area shapes?

Is there any other way to change it property

Please guide.

Thanks

0 Kudos
0 Replies