[OpenLayers-Dev] SVG flip Y value

Domenico Febbo domenico.febbo at gmail.com
Fri Jun 29 06:05:20 EDT 2007


Into SVG.js @ row 241 you have this method:
"
 createRoot: function() {
        var id = this.container.id + "_root";

        var root = this.nodeFactory(id, "g");

        // flip the SVG display Y axis upside down so it
        // matches the display Y axis of the map
        root.setAttributeNS(null, "transform", "scale(1, -1)");

        return root;
    },
"
I don't understand what means the flip transformation for every Y value.
This trasformation flips every Y value of an SVG object and you don't
have bat effect on a circle or a point because that are "simmetric" on
Y axis, but for a "text" element (see spech here [1])
You have a bad flip effect.
Why you don't flip only coordinates value of the center of gravity?

[1] http://www.w3.org/TR/SVG/text.html#TextElement ;

thanks to All

Domenico



More information about the Dev mailing list