mirror of
https://github.com/konvajs/konva.git
synced 2025-11-18 17:21:36 +08:00
added isListening and isDraggable aliases for consistency
This commit is contained in:
14
src/Node.js
14
src/Node.js
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user