Hi Colin, zhan hai <hai.zhan...@gmail.com> wrote on 05/23/2010 02:03:57 AM:
> If new elements are added to position out of the initial bbox, the > canvas won't show these elements. So I want to change viewbox again > to make viewbox contains the newly added element and i expect scroll > pane can resize it's scroll bar to map the extended viewbox. Well the simplest thing is to set 'overflow="visible"' on the root SVG element. > But after calling 'setAttributeNS > (null,SVGConstants.SVG_VIEW_BOX_ATTRIBUTE,'xxxx'), all things in > canvas disappeard . > Any suggestions? I've tested this before and it has worked. Are you sure your 'xxxx' is a valid viewBox specification? I should also say that setting the viewBox is a very expensive operation as we have to rebuild the entire graphics tree because any attributes that use percentages are likely to have changed.