fabric.Group objects toSVG() order changed

Changed the sort order in toSVG() from "first..last" to "last..first".
If they rendern on canvas the same order is used https://github.com/kangax/fabric.js/blob/master/src/group.class.js#L243
This commit is contained in:
Kienz 2013-02-15 13:17:12 +01:00
parent 6aa9bf691b
commit d9f88d061d

View file

@ -495,7 +495,7 @@
*/
toSVG: function() {
var objectsMarkup = [ ];
for (var i = 0, len = this.objects.length; i < len; i++) {
for (var i = this.objects.length; i--; ) {
objectsMarkup.push(this.objects[i].toSVG());
}
@ -553,4 +553,4 @@
*/
fabric.Group.async = true;
})(typeof exports !== 'undefined' ? exports : this);
})(typeof exports !== 'undefined' ? exports : this);