Login Register

Redrawing Polylines

I create a polyline using a typical statement such as

var pLine =sfc.createPolyline(eval(lineString)).setStroke("yellow");

where lineString is the usual set of coordinate pairs such as[{x: 245, y: 153}, {x: 245, y: 152}, {x: 245, y: 151}, {x: 244, y: 151}, {x: 241, y: 150}, {x: 233, ..." (and so forth)

Then later, the background under the line changes, perhaps as a new jpg image.

Can I redraw the "pLine" without having Dojo recalculate its position by reparsing the lineString?
It seems inefficient to require this recalculation each time.

should have been posted to Dojox

Sorry, misposted. If someone can move it they should. I don't think i can move it myself.
James W Cooper

Isn't it redrawn

Isn't it redrawn automatically for you when you change the background?

redrawing

No, if I change the underlying image, the line drawn on top vanishes.

James W Cooper

Huh. What renderer did you

Huh. What renderer did you test? Are you sure you didn't change a z-order of the image?