Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed broken support for pushing sets of sets of sets

  • Loading branch information...
commit abc2c44634bcb10e3deb4532c6e0932bda4e7960 1 parent d3febed
Matthew Taylor rhyolight authored
Showing with 10 additions and 11 deletions.
  1. +10 −10 raphael.group.js
  2. +0 −1  samples/group.html
20 raphael.group.js
View
@@ -45,19 +45,19 @@ Raphael.fn.group = function() {
var transform = group.getAttribute('transform');
group.setAttribute('transform', updateRotation(transform, deg));
},
- push: function(it) {
- var i=0;
+ push: function(item) {
function pushOneRaphaelVector(it){
- group.appendChild(it.node);
- set.push(it);
- }
- if (it.type === 'set') {
- for (; i< it.length; i++) {
- pushOneRaphaelVector(it[i]);
+ var i;
+ if (it.type === 'set') {
+ for (i=0; i< it.length; i++) {
+ pushOneRaphaelVector(it[i]);
+ }
+ } else {
+ group.appendChild(it.node);
+ set.push(it);
}
- } else {
- pushOneRaphaelVector(it);
}
+ pushOneRaphaelVector(item)
return this;
},
getBBox: function() {
1  samples/group.html
View
@@ -57,7 +57,6 @@
sset.push(rectSet);
-
Y.one('#group .bigger').on('click', function() {
groupScale = groupScale + groupStep;
sset.scale(groupScale);
Please sign in to comment.
Something went wrong with that request. Please try again.