Letractively / svgweb

Automatically exported from code.google.com/p/svgweb
Other
0 stars 0 forks source link

Implement currentTranslate and currentScale and have it be a fast path #308

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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());

Original issue reported on code.google.com by bradneub...@gmail.com on 18 Sep 2009 at 3:30

GoogleCodeExporter commented 8 years ago
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.

Original comment by bradneub...@gmail.com on 18 Sep 2009 at 9:41

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r877.

Original comment by bradneub...@gmail.com on 18 Sep 2009 at 9:44

GoogleCodeExporter commented 8 years ago
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/

Original comment by helder.magalhaes on 4 Oct 2009 at 10:45