| Issue 308: | Implement currentTranslate and currentScale and have it be a fast path | |
| 2 people starred this issue and may be notified of changes. | Back to list |
Sign in to add a comment
|
Implement currentTranslate and currentScale and have them be a 'fast path' for faster zooming and panning of the entire root without having to go through the full viewBox parsing and algorithm. We will have to modify the currentTranslate API to take formal getters and setters due to limitations on IE: root.currentTranslate.setX(5); alert(root.currentTranslate.getX()); |
||||||||||
,
Sep 18, 2009
Implemented; helps a very small amount for performance but makes the code easier to comprehend and helps others do zooming and panning much easier than having to mess with the viewBox. |
|||||||||||
,
Sep 18, 2009
This issue was closed by revision r877.
Status: Fixed
|
|||||||||||
,
Oct 04, 2009
Oh, this is way cool! :-) I've been preparing a couple examples [1] (same using SVG Web [2]) [3] using these DOM APIs for zoom and pan: this allows, for example, for an easy implementation of zoom/pan controls (pretty related with issue 291). I've just finished re-factoring them in order to be compatible with SVG Web, but I didn't quite understand the IE limitations which don't allow to manipulate the currentScale and currentTranslate directly, i.e., the standard way (is that an HTC limitation?). Nit for revision 877: (UserManual.html, line 956) + <p id="known_issues25">* <code>currentTranslate</code> is supported on the SVG root tag (see the section <a href="#zoomAndPan">"Zooming and Panning with currentTranslate and currentScale"</a> for details). However, due to limitations in Internet Explorer the way to work with this is slightly different when using SVG Web than the SVG 1.1 standard. See the <a href="#zoomAndPan">section</a> for Missing end of last sentence. Suggested: See the <a href="#zoomAndPan">section</a> for details. Finally, I'd vote for a rename of this issue: something like "Support currentTranslate and currentScale (for zoom/pan, drag&drop and more)" (I'm not sure if the original title was too long and therefore truncated). [1] http://heldermagalhaes.com/stuff/svg/demos/ZoomAndPan-Demo.svg [2] http://heldermagalhaes.com/stuff/svg/demos/ZoomAndPan-Demo-SVGWeb.html [3] http://heldermagalhaes.com/stuff/svg/demos/SVGObject-HTMLCanvasInteractors/ [4] http://code.google.com/p/svgweb/ |
|||||||||||
|
|
|||||||||||