added isListening and isDraggable aliases for consistency

This commit is contained in:
ericdrowell
2012-09-23 16:06:44 -07:00
parent bda7f9f082
commit 24e3aa2c03
4 changed files with 34 additions and 2 deletions

View File

@@ -1106,6 +1106,20 @@ Kinetic.Node._addGetter = function(constructor, attr) {
Kinetic.Node.addGettersSetters(Kinetic.Node, ['x', 'y', 'scale', 'rotation', 'opacity', 'name', 'id', 'offset', 'draggable', 'dragConstraint', 'dragBounds', 'listening']);
Kinetic.Node.addSetters(Kinetic.Node, ['rotationDeg']);
// mappings
/**
* determine if listening to events or not. Alias of getListening()
* @name isListening
* @methodOf Kinetic.Node.prototype
*/
Kinetic.Node.prototype.isListening = Kinetic.Node.prototype.getListening;
/**
* get draggable. Alias of getDraggable()
* @name isDraggable
* @methodOf Kinetic.Node.prototype
*/
Kinetic.Node.prototype.isDraggable = Kinetic.Node.prototype.getDraggable;
/**
* set node x position
* @name setX