Skip to content

Commit

Permalink
Fixed broken support for pushing sets of sets of sets
Browse files Browse the repository at this point in the history
  • Loading branch information
rhyolight committed Sep 25, 2010
1 parent d3febed commit abc2c44
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
20 changes: 10 additions & 10 deletions raphael.group.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
1 change: 0 additions & 1 deletion samples/group.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ <h1>Demo of <a href="http://github.com/rhyolight/Raphael-Plugins/blob/master/rap

sset.push(rectSet);


Y.one('#group .bigger').on('click', function() {
groupScale = groupScale + groupStep;
sset.scale(groupScale);
Expand Down

0 comments on commit abc2c44

Please sign in to comment.