all methods are now copied to Collection prototype so that you don't have to use the each() method all the time

This commit is contained in:
Eric Rowell
2014-01-19 21:35:28 -08:00
parent 79f86f2fe0
commit f1b1c58166
24 changed files with 112 additions and 37 deletions

View File

@@ -594,7 +594,7 @@
*/
shouldDrawHit: function() {
var layer = this.getLayer();
return layer && layer.isHitGraphEnabled() && this.isListening() && this.isVisible() && !Kinetic.isDragging();
return layer && layer.hitGraphEnabled() && this.isListening() && this.isVisible() && !Kinetic.isDragging();
},
/**
* show node
@@ -1934,21 +1934,5 @@
getRotationDeg: 'getRotation'
});
Kinetic.Collection.mapMethods([
'on',
'off',
'remove',
'destroy',
'show',
'hide',
'move',
'rotate',
'moveToTop',
'moveUp',
'moveDown',
'moveToBottom',
'moveTo',
'fire',
'draw'
]);
Kinetic.Collection.mapMethods(Kinetic.Node);
})();