mirror of
https://github.com/konvajs/konva.git
synced 2025-12-17 18:01:15 +08:00
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:
20
src/Node.js
20
src/Node.js
@@ -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);
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user