diff --git a/.gitignore b/.gitignore
index da1ca550..d8269c24 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
jsdoc-toolkit
+jsdoc-master
dist
tests/js/unitTests.js
analysis
diff --git a/src/Animation.js b/src/Animation.js
index c6d0b1dc..f488c525 100644
--- a/src/Animation.js
+++ b/src/Animation.js
@@ -2,6 +2,7 @@
/**
* Animation constructor. A stage is used to contain multiple layers and handle
* @constructor
+ * @memberof Kinetic
* @param {Function} func function executed on each animation frame
* @param {Kinetic.Layer|Array} [layers] layer(s) to be redrawn. Can be a layer, an array of layers, or null. Not specifying a node will result in no redraw.
*/
@@ -21,8 +22,8 @@
Kinetic.Animation.prototype = {
/**
* set layers to be redrawn on each animation frame
- * @name setLayers
- * @methodOf Kinetic.Animation.prototype
+ * @method
+ * @memberof Kinetic.Animation.prototype
* @param {Kinetic.Layer|Array} [layers] layer(s) to be redrawn. Can be a layer, an array of layers, or null. Not specifying a node will result in no redraw.
*/
setLayers: function(layers) {
@@ -44,16 +45,16 @@
},
/**
* get layers
- * @name getLayers
- * @methodOf Kinetic.Animation.prototype
+ * @method
+ * @memberof Kinetic.Animation.prototype
*/
getLayers: function() {
return this.layers;
},
/**
* add layer. Returns true if the layer was added, and false if it was not
- * @name addLayer
- * @methodOf Kinetic.Animation.prototype
+ * @method
+ * @memberof Kinetic.Animation.prototype
* @param {Kinetic.Layer} layer
*/
addLayer: function(layer) {
@@ -79,8 +80,8 @@
},
/**
* determine if animation is running or not. returns true or false
- * @name isRunning
- * @methodOf Kinetic.Animation.prototype
+ * @method
+ * @memberof Kinetic.Animation.prototype
*/
isRunning: function() {
var a = Kinetic.Animation, animations = a.animations;
@@ -93,8 +94,8 @@
},
/**
* start animation
- * @name start
- * @methodOf Kinetic.Animation.prototype
+ * @method
+ * @memberof Kinetic.Animation.prototype
*/
start: function() {
this.stop();
@@ -104,8 +105,8 @@
},
/**
* stop animation
- * @name stop
- * @methodOf Kinetic.Animation.prototype
+ * @method
+ * @memberof Kinetic.Animation.prototype
*/
stop: function() {
Kinetic.Animation._removeAnimation(this);
@@ -226,8 +227,8 @@
/**
* get batch draw
- * @name batchDraw
- * @methodOf Kinetic.Layer.prototype
+ * @method
+ * @memberof Kinetic.Layer.prototype
*/
Kinetic.Layer.prototype.batchDraw = function() {
var batchAnim = Kinetic.Layer.batchAnim;
diff --git a/src/Container.js b/src/Container.js
index d6bc723c..33fb483d 100644
--- a/src/Container.js
+++ b/src/Container.js
@@ -1,12 +1,4 @@
(function() {
- /**
- * Container constructor. Containers are used to contain nodes or other containers
- * @constructor
- * @augments Kinetic.Node
- * @param {Object} config
- * {{NodeParams}}
- * {{ContainerParams}}
- */
Kinetic.Util.addMethods(Kinetic.Container, {
_containerInit: function(config) {
this.children = [];
@@ -14,16 +6,16 @@
},
/**
* get children
- * @name getChildren
- * @methodOf Kinetic.Container.prototype
+ * @method
+ * @memberof Kinetic.Container.prototype
*/
getChildren: function() {
return this.children;
},
/**
* remove all children
- * @name removeChildren
- * @methodOf Kinetic.Container.prototype
+ * @method
+ * @memberof Kinetic.Container.prototype
*/
removeChildren: function() {
while(this.children.length > 0) {
@@ -32,8 +24,8 @@
},
/**
* add node to container
- * @name add
- * @methodOf Kinetic.Container.prototype
+ * @method
+ * @memberof Kinetic.Container.prototype
* @param {Node} child
*/
add: function(child) {
@@ -51,8 +43,8 @@
* ex:
* var node = stage.get('#foo'); // selects node with id foo
* var nodes = layer.get('.bar'); // selects nodes with name bar inside layer
- * @name get
- * @methodOf Kinetic.Container.prototype
+ * @method
+ * @memberof Kinetic.Container.prototype
* @param {String} selector
*/
get: function(selector) {
@@ -131,8 +123,8 @@
/**
* determine if node is an ancestor
* of descendant
- * @name isAncestorOf
- * @methodOf Kinetic.Container.prototype
+ * @method
+ * @memberof Kinetic.Container.prototype
* @param {Kinetic.Node} node
*/
isAncestorOf: function(node) {
@@ -148,8 +140,8 @@
},
/**
* clone node
- * @name clone
- * @methodOf Kinetic.Container.prototype
+ * @method
+ * @memberof Kinetic.Container.prototype
* @param {Object} attrs override attrs
*/
clone: function(obj) {
@@ -164,8 +156,8 @@
},
/**
* get shapes that intersect a point
- * @name getIntersections
- * @methodOf Kinetic.Container.prototype
+ * @method
+ * @memberof Kinetic.Container.prototype
* @param {Object} point
*/
getIntersections: function() {
@@ -183,9 +175,6 @@
return arr;
},
- /**
- * set children indices
- */
_setChildrenIndices: function() {
var children = this.children, len = children.length;
for(var n = 0; n < len; n++) {
@@ -252,13 +241,15 @@
/**
* set clipping function
* @name setClipFunc
- * @methodOf Kinetic.Container.prototype
+ * @method
+ * @memberof Kinetic.Container.prototype
* @param {Number} deg
*/
/**
* get clipping function
* @name getClipFunc
- * @methodOf Kinetic.Container.prototype
+ * @method
+ * @memberof Kinetic.Container.prototype
*/
})();
diff --git a/src/DragAndDrop.js b/src/DragAndDrop.js
index 3d3c5b5f..076a091e 100644
--- a/src/DragAndDrop.js
+++ b/src/DragAndDrop.js
@@ -77,8 +77,8 @@
/**
* initiate drag and drop
- * @name startDrag
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
Kinetic.Node.prototype.startDrag = function() {
var dd = Kinetic.DD,
@@ -104,8 +104,8 @@
/**
* stop drag and drop
- * @name stopDrag
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
Kinetic.Node.prototype.stopDrag = function() {
var dd = Kinetic.DD,
@@ -116,8 +116,8 @@
/**
* set draggable
- * @name setDraggable
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {String} draggable
*/
Kinetic.Node.prototype.setDraggable = function(draggable) {
@@ -141,8 +141,8 @@
/**
* determine if node is currently in drag and drop mode
- * @name isDragging
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
Kinetic.Node.prototype.isDragging = function() {
var dd = Kinetic.DD;
@@ -186,9 +186,6 @@
};
Kinetic.Node.addGetterSetter(Kinetic.Node, 'dragBoundFunc');
- Kinetic.Node.addGetterSetter(Kinetic.Node, 'dragOnTop', true);
-
- Kinetic.Node.addGetter(Kinetic.Node, 'draggable', false);
/**
* set drag bound function. This is used to override the default
@@ -198,26 +195,13 @@
* @param {Function} dragBoundFunc
*/
- /**
- * set flag which enables or disables automatically moving the draggable node to a
- * temporary top layer to improve performance. The default is true
- * @name setDragOnTop
- * @methodOf Kinetic.Node.prototype
- * @param {Boolean} dragOnTop
- */
-
/**
* get dragBoundFunc
* @name getDragBoundFunc
* @methodOf Kinetic.Node.prototype
*/
- /**
- * get flag which enables or disables automatically moving the draggable node to a
- * temporary top layer to improve performance.
- * @name getDragOnTop
- * @methodOf Kinetic.Node.prototype
- */
+ Kinetic.Node.addGetter(Kinetic.Node, 'draggable', false);
/**
* get draggable
@@ -230,6 +214,13 @@
* @name isDraggable
* @methodOf Kinetic.Node.prototype
*/
+
+
+ /**
+ * alias of getDraggable
+ * @name isDraggable
+ * @methodOf Kinetic.Node.prototype
+ */
Kinetic.Node.prototype.isDraggable = Kinetic.Node.prototype.getDraggable;
var html = document.getElementsByTagName('html')[0];
diff --git a/src/Global.js b/src/Global.js
index 2897820d..d8f70c67 100644
--- a/src/Global.js
+++ b/src/Global.js
@@ -26,14 +26,14 @@
* THE SOFTWARE.
*/
/**
- * @namespace
+ * @namespace Kinetic
*/
var Kinetic = {};
(function() {
Kinetic.version = '{{version}}';
/**
- * @namespace
+ * @namespace Filters
*/
Kinetic.Filters = {};
@@ -41,6 +41,8 @@ var Kinetic = {};
* Node constructor. Nodes are entities that can be transformed, layered,
* and have bound events. The stage, layers, groups, and shapes all extend Node.
* @constructor
+ * @memberof Kinetic
+ * @abstract
* @param {Object} config
* {{NodeParams}}
*/
@@ -52,6 +54,7 @@ var Kinetic = {};
* Shape constructor. Shapes are primitive objects such as rectangles,
* circles, text, lines, etc.
* @constructor
+ * @memberof Kinetic
* @augments Kinetic.Node
* @param {Object} config
* {{ShapeParams}}
@@ -64,7 +67,9 @@ var Kinetic = {};
/**
* Container constructor. Containers are used to contain nodes or other containers
* @constructor
+ * @memberof Kinetic
* @augments Kinetic.Node
+ * @abstract
* @param {Object} config
* {{NodeParams}}
* {{ContainerParams}}
@@ -76,6 +81,7 @@ var Kinetic = {};
/**
* Stage constructor. A stage is used to contain multiple layers
* @constructor
+ * @memberof Kinetic
* @augments Kinetic.Container
* @param {Object} config
* @param {String|DomElement} config.container Container id or DOM element
@@ -90,6 +96,7 @@ var Kinetic = {};
* Layer constructor. Layers are tied to their own canvas element and are used
* to contain groups or shapes
* @constructor
+ * @memberof Kinetic
* @augments Kinetic.Container
* @param {Object} config
* @param {Boolean} [config.clearBeforeDraw] set this property to false if you don't want
@@ -104,6 +111,7 @@ var Kinetic = {};
/**
* Group constructor. Groups are used to contain shapes or other groups.
* @constructor
+ * @memberof Kinetic
* @augments Kinetic.Container
* @param {Object} config
* {{NodeParams}}
@@ -114,7 +122,8 @@ var Kinetic = {};
};
/**
- * @namespace
+ * @namespace Global
+ * @memberof Kinetic
*/
Kinetic.Global = {
stages: [],
@@ -125,9 +134,9 @@ var Kinetic = {};
shapes: {},
/**
- * @method isDragging returns whether or not drag and drop
- * is currently active
- * @methodOf Kinetic.Global
+ * returns whether or not drag and drop is currently active
+ * @method
+ * @memberof Kinetic.Global
*/
isDragging: function() {
var dd = Kinetic.DD;
@@ -143,9 +152,10 @@ var Kinetic = {};
}
},
/**
- * @method isDragReady returns whether or not a drag and drop operation is ready, but may
+ * returns whether or not a drag and drop operation is ready, but may
* not necessarily have started
- * @methodOf Kinetic.Global
+ * @method
+ * @memberof Kinetic.Global
*/
isDragReady: function() {
var dd = Kinetic.DD;
diff --git a/src/Layer.js b/src/Layer.js
index 3c0946bb..acd12ab1 100644
--- a/src/Layer.js
+++ b/src/Layer.js
@@ -12,8 +12,8 @@
},
/**
* get intersection object that contains shape and pixel data
- * @name getIntersection
- * @methodOf Kinetic.Layer.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
getIntersection: function() {
var pos = Kinetic.Util._getXY(Array.prototype.slice.call(arguments)),
@@ -60,32 +60,32 @@
},
/**
* get layer canvas
- * @name getCanvas
- * @methodOf Kinetic.Layer.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
getCanvas: function() {
return this.canvas;
},
/**
* get layer hit canvas
- * @name getHitCanvas
- * @methodOf Kinetic.Layer.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
getHitCanvas: function() {
return this.hitCanvas;
},
/**
* get layer canvas context
- * @name getContext
- * @methodOf Kinetic.Layer.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
getContext: function() {
return this.getCanvas().getContext();
},
/**
* clear canvas tied to the layer
- * @name clear
- * @methodOf Kinetic.Layer.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
clear: function() {
this.getCanvas().clear();
@@ -162,9 +162,6 @@
getLayer: function() {
return this;
},
- /**
- * remove layer from stage
- */
remove: function() {
var stage = this.getStage(), canvas = this.getCanvas(), element = canvas.element;
Kinetic.Node.prototype.remove.call(this);
@@ -183,7 +180,8 @@
* set flag which determines if the layer is cleared or not
* before drawing
* @name setClearBeforeDraw
- * @methodOf Kinetic.Layer.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {Boolean} clearBeforeDraw
*/
@@ -191,6 +189,7 @@
* get flag which determines if the layer is cleared or not
* before drawing
* @name getClearBeforeDraw
- * @methodOf Kinetic.Layer.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
})();
diff --git a/src/Node.js b/src/Node.js
index 42bf69b8..d95a3529 100644
--- a/src/Node.js
+++ b/src/Node.js
@@ -46,10 +46,14 @@
* of events delimmited by a space to bind multiple events at once
* such as 'mousedown mouseup mousemove'. Include a namespace to bind an
* event by name such as 'click.foobar'.
- * @name on
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {String} typesStr e.g. 'click', 'mousedown touchstart', 'mousedown.foo touchstart.foo'
* @param {Function} handler The handler function is passed an event object
+ * @example
+ * node.on('click', function() {
+ * console.log('you clicked me!');
+ * }
*/
on: function(typesStr, handler) {
var types = typesStr.split(SPACE),
@@ -86,8 +90,8 @@
* include a namespace to remove an event binding by name
* such as 'click.foobar'. If you only give a name like '.foobar',
* all events in that namespace will be removed.
- * @name off
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {String} typesStr e.g. 'click', 'mousedown touchstart', '.foobar'
*/
off: function(typesStr) {
@@ -121,8 +125,8 @@
},
/**
* remove child from container, but don't destroy it
- * @name remove
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
remove: function() {
var parent = this.getParent();
@@ -135,8 +139,8 @@
},
/**
* remove and destroy node
- * @name destroy
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
destroy: function() {
var parent = this.getParent(),
@@ -159,8 +163,8 @@
},
/**
* get attr
- * @name getAttr
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {String} attr
*/
getAttr: function(attr) {
@@ -175,8 +179,8 @@
},
/**
* set attr
- * @name setAttr
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {String} attr
* #param {*} val
*/
@@ -197,16 +201,12 @@
},
/**
* get attrs
- * @name getAttrs
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
getAttrs: function() {
return this.attrs || {};
},
- /**
- * @name createAttrs
- * @methodOf Kinetic.Node.prototype
- */
createAttrs: function() {
if(this.attrs === undefined) {
this.attrs = {};
@@ -215,8 +215,8 @@
/**
* set attrs
- * @name setAttrs
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {Object} config object containing key value pairs
*/
setAttrs: function(config) {
@@ -240,8 +240,8 @@
* determine if node is visible or not. Node is visible only
* if it's visible and all of its ancestors are visible. If an ancestor
* is invisible, this means that the node is also invisible
- * @name getVisible
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
getVisible: function() {
var visible = this.attrs.visible,
@@ -261,8 +261,8 @@
* determine if node is listening or not. Node is listening only
* if it's listening and all of its ancestors are listening. If an ancestor
* is not listening, this means that the node is also not listening
- * @name getListening
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
getListening: function() {
var listening = this.attrs.listening,
@@ -280,24 +280,24 @@
},
/**
* show node
- * @name show
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
show: function() {
this.setVisible(true);
},
/**
* hide node. Hidden nodes are no longer detectable
- * @name hide
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
hide: function() {
this.setVisible(false);
},
/**
* get zIndex relative to the node's siblings who share the same parent
- * @name getZIndex
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
getZIndex: function() {
return this.index || 0;
@@ -305,8 +305,8 @@
/**
* get absolute z-index which takes into account sibling
* and ancestor indices
- * @name getAbsoluteZIndex
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
getAbsoluteZIndex: function() {
var level = this.getLevel(),
@@ -345,8 +345,8 @@
* get node level in node tree. Returns an integer.
* e.g. Stage level will always be 0. Layers will always be 1. Groups and Shapes will always
* be >= 2
- * @name getLevel
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
getLevel: function() {
var level = 0,
@@ -360,8 +360,8 @@
},
/**
* set node position relative to parent
- * @name setPosition
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {Number} x
* @param {Number} y
*/
@@ -372,8 +372,8 @@
},
/**
* get node position relative to parent
- * @name getPosition
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
getPosition: function() {
return {
@@ -383,8 +383,8 @@
},
/**
* get absolute position relative to the top left corner of the stage container div
- * @name getAbsolutePosition
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
getAbsolutePosition: function() {
var trans = this.getAbsoluteTransform(),
@@ -395,8 +395,8 @@
},
/**
* set absolute position
- * @name setAbsolutePosition
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {Number} x
* @param {Number} y
*/
@@ -426,8 +426,8 @@
},
/**
* move node by an amount relative to its current position
- * @name move
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {Number} x
* @param {Number} y
*/
@@ -467,8 +467,8 @@
},
/**
* rotate node by an amount in radians relative to its current rotation
- * @name rotate
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {Number} theta
*/
rotate: function(theta) {
@@ -476,8 +476,8 @@
},
/**
* rotate node by an amount in degrees relative to its current rotation
- * @name rotateDeg
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {Number} deg
*/
rotateDeg: function(deg) {
@@ -485,8 +485,8 @@
},
/**
* move node to the top of its siblings
- * @name moveToTop
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
moveToTop: function() {
var index = this.index;
@@ -497,8 +497,8 @@
},
/**
* move node up
- * @name moveUp
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
moveUp: function() {
var index = this.index,
@@ -512,8 +512,8 @@
},
/**
* move node down
- * @name moveDown
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
moveDown: function() {
var index = this.index;
@@ -526,8 +526,8 @@
},
/**
* move node to the bottom of its siblings
- * @name moveToBottom
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
moveToBottom: function() {
var index = this.index;
@@ -540,8 +540,8 @@
},
/**
* set zIndex relative to siblings
- * @name setZIndex
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {Integer} zIndex
*/
setZIndex: function(zIndex) {
@@ -552,8 +552,8 @@
},
/**
* get absolute opacity
- * @name getAbsoluteOpacity
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
getAbsoluteOpacity: function() {
var absOpacity = this.getOpacity();
@@ -564,8 +564,8 @@
},
/**
* move node to another container
- * @name moveTo
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {Container} newContainer
*/
moveTo: function(newContainer) {
@@ -574,8 +574,8 @@
},
/**
* convert Node into an object for serialization. Returns an object.
- * @name toObject
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
toObject: function() {
var type = Kinetic.Util,
@@ -600,32 +600,32 @@
},
/**
* convert Node into a JSON string. Returns a JSON string.
- * @name toJSON
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
toJSON: function() {
return JSON.stringify(this.toObject());
},
/**
* get parent container
- * @name getParent
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
getParent: function() {
return this.parent;
},
/**
* get layer ancestor
- * @name getLayer
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
getLayer: function() {
return this.getParent().getLayer();
},
/**
* get stage ancestor
- * @name getStage
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
getStage: function() {
if(this.getParent()) {
@@ -637,8 +637,8 @@
},
/**
* fire event
- * @name fire
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {String} eventType event type. can be a regular event, like click, mouseover, or mouseout, or it can be a custom event, like myCustomEvent
* @param {EventObject} evt event object
* @param {Boolean} bubble setting the value to false, or leaving it undefined, will result in the event
@@ -657,8 +657,8 @@
/**
* get absolute transform of the node which takes into
* account its ancestor transforms
- * @name getAbsoluteTransform
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
getAbsoluteTransform: function() {
// absolute transform
@@ -705,8 +705,8 @@
},
/**
* get transform of the node
- * @name getTransform
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
getTransform: function(useCache) {
var cachedTransform = this.cachedTransform;
@@ -719,8 +719,8 @@
},
/**
* clone node. Returns a new Node instance with identical attributes
- * @name clone
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {Object} attrs override attrs
*/
clone: function(obj) {
@@ -757,8 +757,8 @@
* Creates a composite data URL. If MIME type is not
* specified, then "image/png" will result. For "image/jpeg", specify a quality
* level as quality (range 0.0 - 1.0)
- * @name toDataURL
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {Object} config
* @param {Function} config.callback function executed when the composite has completed
* @param {String} [config.mimeType] can be "image/png" or "image/jpeg".
@@ -800,8 +800,8 @@
* converts node into an image. Since the toImage
* method is asynchronous, a callback is required. toImage is most commonly used
* to cache complex drawings as an image so that they don't have to constantly be redrawn
- * @name toImage
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {Object} config
* @param {Function} config.callback function executed when the composite has completed
* @param {String} [config.mimeType] can be "image/png" or "image/jpeg".
@@ -821,8 +821,8 @@
},
/**
* set size
- * @name setSize
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {Number} width
* @param {Number} height
*/
@@ -834,8 +834,8 @@
},
/**
* get size
- * @name getSize
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
getSize: function() {
return {
@@ -845,16 +845,16 @@
},
/**
* get width
- * @name getWidth
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
getWidth: function() {
return this.attrs.width || 0;
},
/**
* get height
- * @name getHeight
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
getHeight: function() {
return this.attrs.height || 0;
@@ -926,8 +926,8 @@
},
/**
* set id
- * @name setId
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {String} id
*/
setId: function(id) {
@@ -941,8 +941,8 @@
},
/**
* set name
- * @name setName
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {String} name
*/
setName: function(name) {
@@ -956,8 +956,8 @@
},
/**
* get node type. Returns 'Stage', 'Layer', 'Group', or 'Shape'
- * @name getNodeType
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
getNodeType: function() {
return this.nodeType;
@@ -1013,8 +1013,8 @@
},
/*
* draw both scene and hit graphs. If the node being drawn is the stage, all of the layers will be cleared and redra
- * @name draw
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* the scene renderer
*/
draw: function() {
@@ -1208,8 +1208,8 @@
* event handlers (it probably does), then you need to select the appropriate
* shapes after loading the stage and set these properties via on(), setDrawFunc(),
* and setImage() methods
- * @name create
- * @methodOf Kinetic.Node
+ * @method
+ * @memberof Kinetic.Node
* @param {String} JSON string
* @param {DomElement} [container] optional container dom element used only if you're
* creating a stage node
@@ -1256,14 +1256,16 @@
/**
* set x position
* @name setX
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {Number} x
*/
/**
* get x position
* @name getX
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
Kinetic.Node.addGetterSetter(Kinetic.Node, 'y', 0, true);
@@ -1271,14 +1273,16 @@
/**
* set y position
* @name setY
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {Number} y
*/
/**
* get y position
* @name getY
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
Kinetic.Node.addGetterSetter(Kinetic.Node, 'opacity', 1);
@@ -1288,14 +1292,16 @@
* A node with an opacity of 0 is fully transparent, and a node
* with an opacity of 1 is fully opaque
* @name setOpacity
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {Object} opacity
*/
/**
* get opacity.
* @name getOpacity
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
Kinetic.Node.addGetter(Kinetic.Node, 'name');
@@ -1303,7 +1309,8 @@
/**
* get name
* @name getName
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
Kinetic.Node.addGetter(Kinetic.Node, 'id');
@@ -1311,7 +1318,8 @@
/**
* get id
* @name getId
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
Kinetic.Node.addRotationGetterSetter(Kinetic.Node, 'rotation', 0, true);
@@ -1319,27 +1327,31 @@
/**
* set rotation in radians
* @name setRotation
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {Number} theta
*/
/**
* set rotation in degrees
* @name setRotationDeg
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {Number} deg
*/
/**
* get rotation in degrees
* @name getRotationDeg
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
/**
* get rotation in radians
* @name getRotation
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
Kinetic.Node.addPointGetterSetter(Kinetic.Node, 'scale', 1, true);
@@ -1349,39 +1361,45 @@
* @name setScale
* @param {Number} x
* @param {Number} y
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
/**
* set scale x
* @name setScaleX
* @param {Number} x
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
/**
* set scale y
* @name setScaleY
* @param {Number} y
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
/**
* get scale
* @name getScale
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
/**
* get scale x
* @name getScaleX
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
/**
* get scale y
* @name getScaleY
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
Kinetic.Node.addPointGetterSetter(Kinetic.Node, 'skew', 0, true);
@@ -1391,39 +1409,45 @@
* @name setSkew
* @param {Number} x
* @param {Number} y
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
/**
* set skew x
* @name setSkewX
* @param {Number} x
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
/**
* set skew y
* @name setSkewY
* @param {Number} y
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
/**
* get skew
* @name getSkew
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
/**
* get skew x
* @name getSkewX
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
/**
* get skew y
* @name getSkewY
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
Kinetic.Node.addPointGetterSetter(Kinetic.Node, 'offset', 0, true);
@@ -1431,7 +1455,8 @@
/**
* set offset. A node's offset defines the position and rotation point
* @name setOffset
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {Number} x
* @param {Number} y
*/
@@ -1439,33 +1464,38 @@
/**
* set offset x
* @name setOffsetX
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {Number} x
*/
/**
* set offset y
* @name setOffsetY
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {Number} y
*/
/**
* get offset
* @name getOffset
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
/**
* get offset x
* @name getOffsetX
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
/**
* get offset y
* @name getOffsetY
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
Kinetic.Node.addSetter(Kinetic.Node, 'width');
@@ -1473,7 +1503,8 @@
/**
* set width
* @name setWidth
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {Number} width
*/
@@ -1482,7 +1513,8 @@
/**
* set height
* @name setHeight
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {Number} height
*/
@@ -1491,7 +1523,8 @@
/**
* listen or don't listen to events
* @name setListening
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {Boolean} listening
*/
@@ -1500,7 +1533,8 @@
/**
* set visible
* @name setVisible
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
* @param {Boolean} visible
*/
@@ -1508,13 +1542,15 @@
/**
* Alias of getListening()
* @name isListening
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
Kinetic.Node.prototype.isListening = Kinetic.Node.prototype.getListening;
/**
* Alias of getVisible()
* @name isVisible
- * @methodOf Kinetic.Node.prototype
+ * @method
+ * @memberof Kinetic.Node.prototype
*/
Kinetic.Node.prototype.isVisible = Kinetic.Node.prototype.getVisible;
diff --git a/src/Shape.js b/src/Shape.js
index 3d2f42f3..cf2a5aac 100644
--- a/src/Shape.js
+++ b/src/Shape.js
@@ -40,32 +40,32 @@
},
/**
* get canvas context tied to the layer
- * @name getContext
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
getContext: function() {
return this.getLayer().getContext();
},
/**
* get canvas renderer tied to the layer. Note that this returns a canvas renderer, not a canvas element
- * @name getCanvas
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
getCanvas: function() {
return this.getLayer().getCanvas();
},
/**
* returns whether or not a shadow will be rendered
- * @name hasShadow
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
hasShadow: function() {
return !!(this.getShadowColor() || this.getShadowBlur() || this.getShadowOffsetX() || this.getShadowOffsetY());
},
/**
* returns whether or not a fill is present
- * @name hasFill
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
hasFill: function() {
return !!(this.getFill() || this.getFillPatternImage() || this.getFillLinearGradientColorStops() || this.getFillRadialGradientColorStops());
@@ -77,8 +77,8 @@
* determines if point is in the shape, regardless if other shapes are on top of it. Note: because
* this method clears a temp hit canvas, and redraws the shape, it performs very poorly if executed many times
* consecutively. If possible, it's better to use the stage.getIntersections() method instead
- * @name intersects
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Object} point point can be an object containing
* an x and y property, or it can be an array with two elements
* in which the first element is the x component and the second
@@ -95,68 +95,88 @@
},
/**
* enable fill
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
enableFill: function() {
this._setAttr('fillEnabled', true);
},
/**
* disable fill
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
disableFill: function() {
this._setAttr('fillEnabled', false);
},
/**
* enable stroke
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
enableStroke: function() {
this._setAttr('strokeEnabled', true);
},
/**
* disable stroke
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
disableStroke: function() {
this._setAttr('strokeEnabled', false);
},
/**
* enable stroke scale
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
enableStrokeScale: function() {
this._setAttr('strokeScaleEnabled', true);
},
/**
* disable stroke scale
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
disableStrokeScale: function() {
this._setAttr('strokeScaleEnabled', false);
},
/**
* enable shadow
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
enableShadow: function() {
this._setAttr('shadowEnabled', true);
},
/**
* disable shadow
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
disableShadow: function() {
this._setAttr('shadowEnabled', false);
},
/**
* enable dash array
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
enableDashArray: function() {
this._setAttr('dashArrayEnabled', true);
},
/**
* disable dash array
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
disableDashArray: function() {
this._setAttr('dashArrayEnabled', false);
},
/**
* get shape type. Ex. 'Circle', 'Rect', 'Text', etc.
- * @name getShapeType
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
getShapeType: function() {
return this.shapeType;
@@ -211,66 +231,76 @@
/**
* set stroke color
* @name setStroke
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {String} color
*/
/**
* set stroke color with an object literal
* @name setStrokeRGB
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Obect} color requires an object literal containing an r, g, and b component
*/
/**
* set stroke color red component
* @name setStrokeR
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Integer} red
*/
/**
* set stroke color green component
* @name setStrokeG
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Integer} green
*/
/**
* set stroke color blue component
* @name setStrokeB
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Integer} blue
*/
/**
* get stroke color
* @name getStroke
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
/**
* get stroke color as an object literal
* @name getStrokeRGB
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
/**
* get stroke color red component
* @name getStrokeR
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
/**
* get stroke color green component
* @name getStrokeG
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
/**
* get stroke color blue component
* @name getStrokeB
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addGetterSetter(Kinetic.Shape, 'lineJoin');
@@ -278,7 +308,8 @@
/**
* set line join
* @name setLineJoin
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {String} lineJoin. Can be miter, round, or bevel. The
* default is miter
*/
@@ -286,7 +317,8 @@
/**
* get line join
* @name getLineJoin
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
@@ -295,14 +327,16 @@
/**
* set line cap. Can be butt, round, or square
* @name setLineCap
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {String} lineCap
*/
/**
* get line cap
* @name getLineCap
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addGetterSetter(Kinetic.Shape, 'strokeWidth');
@@ -310,14 +344,16 @@
/**
* set stroke width
* @name setStrokeWidth
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number} strokeWidth
*/
/**
* get stroke width
* @name getStrokeWidth
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addGetterSetter(Kinetic.Shape, 'drawFunc');
@@ -325,14 +361,16 @@
/**
* set draw function
* @name setDrawFunc
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Function} drawFunc drawing function
*/
/**
* get draw function
* @name getDrawFunc
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addGetterSetter(Kinetic.Shape, 'drawHitFunc');
@@ -340,14 +378,16 @@
/**
* set draw hit function used for hit detection
* @name setDrawHitFunc
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Function} drawHitFunc drawing function used for hit detection
*/
/**
* get draw hit function
* @name getDrawHitFunc
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addGetterSetter(Kinetic.Shape, 'dashArray');
@@ -355,7 +395,8 @@
/**
* set dash array.
* @name setDashArray
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Array} dashArray
* examples:
* [10, 5] dashes are 10px long and 5 pixels apart
@@ -368,7 +409,8 @@
/**
* get dash array
* @name getDashArray
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addColorGetterSetter(Kinetic.Shape, 'shadowColor');
@@ -376,66 +418,76 @@
/**
* set shadow color
* @name setShadowColor
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {String} color
*/
/**
* set shadow color with an object literal
* @name setShadowColorRGB
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Obect} color requires an object literal containing an r, g, and b component
*/
/**
* set shadow color red component
* @name setShadowColorR
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Integer} red
*/
/**
* set shadow color green component
* @name setShadowColorG
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Integer} green
*/
/**
* set shadow color blue component
* @name setShadowColorB
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Integer} blue
*/
/**
* get shadow color
* @name getShadowColor
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
/**
* get shadow color as an object literal
* @name getShadowColorRGB
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
/**
* get shadow color red component
* @name getShadowColorR
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
/**
* get shadow color green component
* @name getShadowColorG
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
/**
* get shadow color blue component
* @name getShadowColorB
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addGetterSetter(Kinetic.Shape, 'shadowBlur');
@@ -443,14 +495,16 @@
/**
* set shadow blur
* @name setShadowBlur
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number} blur
*/
/**
* get shadow blur
* @name getShadowBlur
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addGetterSetter(Kinetic.Shape, 'shadowOpacity');
@@ -458,14 +512,16 @@
/**
* set shadow opacity
* @name setShadowOpacity
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number} opacity must be a value between 0 and 1
*/
/**
* get shadow opacity
* @name getShadowOpacity
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addGetterSetter(Kinetic.Shape, 'fillPatternImage');
@@ -473,14 +529,16 @@
/**
* set fill pattern image
* @name setFillPatternImage
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Image} image object
*/
/**
* get fill pattern image
* @name getFillPatternImage
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addColorGetterSetter(Kinetic.Shape, 'fill');
@@ -488,66 +546,76 @@
/**
* set fill color
* @name setFill
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {String} color
*/
/**
* set fill color with an object literal
* @name setFillRGB
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Obect} color requires an object literal containing an r, g, and b component
*/
/**
* set fill color red component
* @name setFillR
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Integer} red
*/
/**
* set fill color green component
* @name setFillG
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Integer} green
*/
/**
* set fill color blue component
* @name setFillB
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Integer} blue
*/
/**
* get fill color
* @name getFill
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
/**
* get fill color as an object literal
* @name getFillRGB
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
/**
* get fill color red component
* @name getFillR
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
/**
* get fill color green component
* @name getFillG
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
/**
* get fill color blue component
* @name getFillB
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addGetterSetter(Kinetic.Shape, 'fillPatternX');
@@ -555,14 +623,16 @@
/**
* set fill pattern x
* @name setFillPatternX
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number} x
*/
/**
* get fill pattern x
* @name getFillPatternX
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addGetterSetter(Kinetic.Shape, 'fillPatternY');
@@ -570,14 +640,16 @@
/**
* set fill pattern y
* @name setFillPatternY
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number} y
*/
/**
* get fill pattern y
* @name getFillPatternY
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addGetterSetter(Kinetic.Shape, 'fillLinearGradientColorStops');
@@ -585,14 +657,16 @@
/**
* set fill linear gradient color stops
* @name setFillLinearGradientColorStops
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Array} colorStops
*/
/**
* get fill linear gradient color stops
* @name getFillLinearGradientColorStops
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Array} colorStops
*/
@@ -601,14 +675,16 @@
/**
* set fill radial gradient start radius
* @name setFillRadialGradientStartRadius
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number} radius
*/
/**
* get fill radial gradient start radius
* @name getFillRadialGradientStartRadius
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addGetterSetter(Kinetic.Shape, 'fillRadialGradientEndRadius');
@@ -616,14 +692,16 @@
/**
* set fill radial gradient end radius
* @name setFillRadialGradientEndRadius
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number} radius
*/
/**
* get fill radial gradient end radius
* @name getFillRadialGradientEndRadius
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addGetterSetter(Kinetic.Shape, 'fillRadialGradientColorStops');
@@ -631,14 +709,16 @@
/**
* set fill radial gradient color stops
* @name setFillRadialGradientColorStops
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number} colorStops
*/
/**
* get fill radial gradient color stops
* @name getFillRadialGradientColorStops
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addGetterSetter(Kinetic.Shape, 'fillPatternRepeat');
@@ -646,14 +726,16 @@
/**
* set fill pattern repeat
* @name setFillPatternRepeat
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number} repeat can be 'repeat', 'repeat-x', 'repeat-y', or 'no-repeat'. The default is 'no-repeat'
*/
/**
* get fill pattern repeat
* @name getFillPatternRepeat
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addGetterSetter(Kinetic.Shape, 'fillEnabled', true);
@@ -661,14 +743,16 @@
/**
* set fill enabled
* @name setFillEnabled
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Boolean} enabled
*/
/**
* get fill enabled
* @name getFillEnabled
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addGetterSetter(Kinetic.Shape, 'strokeEnabled', true);
@@ -676,14 +760,16 @@
/**
* set stroke enabled
* @name setStrokeEnabled
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Boolean} enabled
*/
/**
* get stroke enabled
* @name getStrokeEnabled
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addGetterSetter(Kinetic.Shape, 'shadowEnabled', true);
@@ -691,14 +777,16 @@
/**
* set shadow enabled
* @name setShadowEnabled
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Boolean} enabled
*/
/**
* get shadow enabled
* @name getShadowEnabled
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addGetterSetter(Kinetic.Shape, 'dashArrayEnabled', true);
@@ -706,14 +794,16 @@
/**
* set dash array enabled
* @name setDashArrayEnabled
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Boolean} enabled
*/
/**
* get dash array enabled
* @name getDashArrayEnabled
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addGetterSetter(Kinetic.Shape, 'fillPriority', 'color');
@@ -721,7 +811,8 @@
/**
* set fill priority
* @name setFillPriority
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number} priority can be color, pattern, linear-gradient, or radial-gradient
* The default is color.
*/
@@ -729,7 +820,8 @@
/**
* get fill priority
* @name getFillPriority
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addGetterSetter(Kinetic.Shape, 'strokeScaleEnabled', true);
@@ -737,14 +829,16 @@
/**
* set stroke scale enabled
* @name setStrokeScaleEnabled
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Boolean} enabled
*/
/**
* get stroke scale enabled
* @name getStrokeScaleEnabled
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addPointGetterSetter(Kinetic.Shape, 'fillPatternOffset', 0);
@@ -752,40 +846,46 @@
/**
* set fill pattern offset
* @name setFillPatternOffset
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number|Array|Object} offset
*/
/**
* set fill pattern offset x
* @name setFillPatternOffsetX
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number} x
*/
/**
* set fill pattern offset y
* @name setFillPatternOffsetY
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number} y
*/
/**
* get fill pattern offset
* @name getFillPatternOffset
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
/**
* get fill pattern offset x
* @name getFillPatternOffsetX
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
/**
* get fill pattern offset y
* @name getFillPatternOffsetY
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addPointGetterSetter(Kinetic.Shape, 'fillPatternScale', 1);
@@ -793,40 +893,46 @@
/**
* set fill pattern scale
* @name setFillPatternScale
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number|Array|Object} scale
*/
/**
* set fill pattern scale x
* @name setFillPatternScaleX
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number} x
*/
/**
* set fill pattern scale y
* @name setFillPatternScaleY
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number} y
*/
/**
* get fill pattern scale
* @name getFillPatternScale
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
/**
* get fill pattern scale x
* @name getFillPatternScaleX
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
/**
* get fill pattern scale y
* @name getFillPatternScaleY
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addPointGetterSetter(Kinetic.Shape, 'fillLinearGradientStartPoint', 0);
@@ -834,40 +940,46 @@
/**
* set fill linear gradient start point
* @name setFillLinearGradientStartPoint
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number|Array|Object} startPoint
*/
/**
* set fill linear gradient start point x
* @name setFillLinearGradientStartPointX
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number} x
*/
/**
* set fill linear gradient start point y
* @name setFillLinearGradientStartPointY
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number} y
*/
/**
* get fill linear gradient start point
* @name getFillLinearGradientStartPoint
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
/**
* get fill linear gradient start point x
* @name getFillLinearGradientStartPointX
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
/**
* get fill linear gradient start point y
* @name getFillLinearGradientStartPointY
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addPointGetterSetter(Kinetic.Shape, 'fillLinearGradientEndPoint', 0);
@@ -875,40 +987,46 @@
/**
* set fill linear gradient end point
* @name setFillLinearGradientEndPoint
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number|Array|Object} endPoint
*/
/**
* set fill linear gradient end point x
* @name setFillLinearGradientEndPointX
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number} x
*/
/**
* set fill linear gradient end point y
* @name setFillLinearGradientEndPointY
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number} y
*/
/**
* get fill linear gradient end point
* @name getFillLinearGradientEndPoint
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
/**
* get fill linear gradient end point x
* @name getFillLinearGradientEndPointX
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
/**
* get fill linear gradient end point y
* @name getFillLinearGradientEndPointY
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addPointGetterSetter(Kinetic.Shape, 'fillRadialGradientStartPoint', 0);
@@ -916,40 +1034,46 @@
/**
* set fill radial gradient start point
* @name setFillRadialGradientStartPoint
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number|Array|Object} startPoint
*/
/**
* set fill radial gradient start point x
* @name setFillRadialGradientStartPointX
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number} x
*/
/**
* set fill radial gradient start point y
* @name setFillRadialGradientStartPointY
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number} y
*/
/**
* get fill radial gradient start point
* @name getFillRadialGradientStartPoint
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
/**
* get fill radial gradient start point x
* @name getFillRadialGradientStartPointX
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
/**
* get fill radial gradient start point y
* @name getFillRadialGradientStartPointY
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addPointGetterSetter(Kinetic.Shape, 'fillRadialGradientEndPoint', 0);
@@ -957,40 +1081,46 @@
/**
* set fill radial gradient end point
* @name setFillRadialGradientEndPoint
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number|Array|Object} endPoint
*/
/**
* set fill radial gradient end point x
* @name setFillRadialGradientEndPointX
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number} x
*/
/**
* set fill radial gradient end point y
* @name setFillRadialGradientEndPointY
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number} y
*/
/**
* get fill radial gradient end point
* @name getFillRadialGradientEndPoint
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
/**
* get fill radial gradient end point x
* @name getFillRadialGradientEndPointX
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
/**
* get fill radial gradient end point y
* @name getFillRadialGradientEndPointY
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addPointGetterSetter(Kinetic.Shape, 'shadowOffset', 0);
@@ -998,40 +1128,46 @@
/**
* set shadow offset
* @name setShadowOffset
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number|Array|Object} offset
*/
/**
* set shadow offset x
* @name setShadowOffsetX
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number} x
*/
/**
* set shadow offset y
* @name setShadowOffsetY
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number} y
*/
/**
* get shadow offset
* @name getShadowOffset
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
/**
* get shadow offset x
* @name getShadowOffsetX
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
/**
* get shadow offset y
* @name getShadowOffsetY
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
Kinetic.Node.addRotationGetterSetter(Kinetic.Shape, 'fillPatternRotation', 0);
@@ -1039,27 +1175,31 @@
/**
* set fill pattern rotation in radians
* @name setFillPatternRotation
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number} rotation
*/
/**
* set fill pattern rotation in degrees
* @name setFillPatternRotationDeg
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
* @param {Number} rotationDeg
*/
/**
* get fill pattern rotation in radians
* @name getFillPatternRotation
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
/**
* get fill pattern rotation in degrees
* @name getFillPatternRotationDeg
- * @methodOf Kinetic.Shape.prototype
+ * @method
+ * @memberof Kinetic.Shape.prototype
*/
})();
diff --git a/src/Stage.js b/src/Stage.js
index adea6354..4283346a 100644
--- a/src/Stage.js
+++ b/src/Stage.js
@@ -49,8 +49,8 @@
},
/**
* set container dom element which contains the stage wrapper div element
- * @name setContainer
- * @methodOf Kinetic.Stage.prototype
+ * @method
+ * @memberof Kinetic.Stage.prototype
* @param {DomElement} container can pass in a dom element or id string
*/
setContainer: function(container) {
@@ -78,19 +78,21 @@
/**
* draw layer scene graphs
* @name draw
- * @methodOf Kinetic.Stage.prototype
+ * @method
+ * @memberof Kinetic.Stage.prototype
*/
/**
* draw layer hit graphs
* @name drawHit
- * @methodOf Kinetic.Stage.prototype
+ * @method
+ * @memberof Kinetic.Stage.prototype
*/
/**
* set height
- * @name setHeight
- * @methodOf Kinetic.Stage.prototype
+ * @method
+ * @memberof Kinetic.Stage.prototype
* @param {Number} height
*/
setHeight: function(height) {
@@ -99,8 +101,8 @@
},
/**
* set width
- * @name setWidth
- * @methodOf Kinetic.Stage.prototype
+ * @method
+ * @memberof Kinetic.Stage.prototype
* @param {Number} width
*/
setWidth: function(width) {
@@ -109,8 +111,8 @@
},
/**
* clear all layers
- * @name clear
- * @methodOf Kinetic.Stage.prototype
+ * @method
+ * @memberof Kinetic.Stage.prototype
*/
clear: function() {
var layers = this.children,
@@ -123,6 +125,8 @@
},
/**
* remove stage
+ * @method
+ * @memberof Kinetic.Stage.prototype
*/
remove: function() {
var content = this.content;
@@ -134,24 +138,24 @@
},
/**
* get mouse position for desktop apps
- * @name getMousePosition
- * @methodOf Kinetic.Stage.prototype
+ * @method
+ * @memberof Kinetic.Stage.prototype
*/
getMousePosition: function() {
return this.mousePos;
},
/**
* get touch position for mobile apps
- * @name getTouchPosition
- * @methodOf Kinetic.Stage.prototype
+ * @method
+ * @memberof Kinetic.Stage.prototype
*/
getTouchPosition: function() {
return this.touchPos;
},
/**
* get pointer position which can be a touc position or mouse position
- * @name getPointerPosition
- * @methodOf Kinetic.Stage.prototype
+ * @method
+ * @memberof Kinetic.Stage.prototype
*/
getPointerPosition: function() {
return this.getTouchPosition() || this.getMousePosition();
@@ -162,16 +166,16 @@
/**
* get stage content div element which has the
* the class name "kineticjs-content"
- * @name getContent
- * @methodOf Kinetic.Stage.prototype
+ * @method
+ * @memberof Kinetic.Stage.prototype
*/
getContent: function() {
return this.content;
},
/**
* Creates a composite data URL and requires a callback because the composite is generated asynchronously.
- * @name toDataURL
- * @methodOf Kinetic.Stage.prototype
+ * @method
+ * @memberof Kinetic.Stage.prototype
* @param {Object} config
* @param {Function} config.callback function executed when the composite has completed
* @param {String} [config.mimeType] can be "image/png" or "image/jpeg".
@@ -223,8 +227,8 @@
},
/**
* converts stage into an image.
- * @name toImage
- * @methodOf Kinetic.Stage.prototype
+ * @method
+ * @memberof Kinetic.Stage.prototype
* @param {Object} config
* @param {Function} config.callback function executed when the composite has completed
* @param {String} [config.mimeType] can be "image/png" or "image/jpeg".
@@ -249,8 +253,8 @@
},
/**
* get intersection object that contains shape and pixel data
- * @name getIntersection
- * @methodOf Kinetic.Stage.prototype
+ * @method
+ * @memberof Kinetic.Stage.prototype
* @param {Object} pos point object
*/
getIntersection: function() {
@@ -295,6 +299,8 @@
},
/**
* add layer to stage
+ * @method
+ * @memberof Kinetic.Stage.prototype
* @param {Kinetic.Layer} layer
*/
add: function(layer) {
@@ -317,8 +323,8 @@
},
/**
* get layers
- * @name getLayers
- * @methodOf Kinetic.Stage.prototype
+ * @method
+ * @memberof Kinetic.Stage.prototype
*/
getLayers: function() {
return this.getChildren();
@@ -330,10 +336,6 @@
this._setMousePosition(evt);
this._setTouchPosition(evt);
},
- /**
- * begin listening for events by adding event handlers
- * to the container
- */
_bindContentEvents: function() {
var that = this,
n;
@@ -513,10 +515,6 @@
dd._drag(evt);
}
},
- /**
- * set mouse positon for desktop apps
- * @param {Event} evt
- */
_setMousePosition: function(evt) {
var mouseX = evt.clientX - this._getContentPosition().left,
mouseY = evt.clientY - this._getContentPosition().top;
@@ -526,10 +524,6 @@
y: mouseY
};
},
- /**
- * set touch position for mobile apps
- * @param {Event} evt
- */
_setTouchPosition: function(evt) {
var touch, touchX, touchY;
@@ -547,9 +541,6 @@
};
}
},
- /**
- * get container position
- */
_getContentPosition: function() {
var rect = this.content.getBoundingClientRect();
return {
@@ -557,9 +548,6 @@
left: rect.left
};
},
- /**
- * build dom
- */
_buildDOM: function() {
// content
this.content = document.createElement(DIV);
@@ -573,11 +561,6 @@
this._resizeDOM();
},
- /**
- * bind event listener to container DOM element
- * @param {String} typesStr
- * @param {function} handler
- */
_onContent: function(typesStr, handler) {
var types = typesStr.split(SPACE),
len = types.length,
@@ -597,6 +580,7 @@
/**
* get container DOM element
* @name getContainer
- * @methodOf Kinetic.Stage.prototype
+ * @method
+ * @memberof Kinetic.Stage.prototype
*/
})();