mirror of
https://github.com/konvajs/konva.git
synced 2025-09-18 09:50:05 +08:00
pulled Node config params and Shape config params into a textfile, and now using token replacement to auto fill Node and Shape config params throughout the code base. In this way, if I need to make changes to the Node or Shape configs, those changes are propagated to all of the other constructors
This commit is contained in:
9
Thorfile
9
Thorfile
@@ -143,11 +143,10 @@ class Build < Thor
|
||||
def replace_tokens(content, version)
|
||||
date = Time.now.strftime("%b %d %Y")
|
||||
|
||||
# Add the version number
|
||||
content.gsub!("@version", version)
|
||||
|
||||
# Add the date
|
||||
content.sub!("@date", date)
|
||||
content.gsub!("{{version}}", version)
|
||||
content.sub!("{{date}}", date)
|
||||
content.gsub!("{{NodeParams}}", IO.read("configParams/NodeParams.txt"))
|
||||
content.gsub!("{{ShapeParams}}", IO.read("configParams/ShapeParams.txt"))
|
||||
|
||||
return content
|
||||
end
|
||||
|
19
configParams/NodeParams.txt
Normal file
19
configParams/NodeParams.txt
Normal file
@@ -0,0 +1,19 @@
|
||||
@param {Number} [config.x]
|
||||
* @param {Number} [config.y]
|
||||
* @param {Number} [config.width]
|
||||
* @param {Number} [config.height]
|
||||
* @param {Boolean} [config.visible]
|
||||
* @param {Boolean} [config.listening] whether or not the node is listening for events
|
||||
* @param {String} [config.id] unique id
|
||||
* @param {String} [config.name] non-unique name
|
||||
* @param {Number} [config.opacity] determines node opacity. Can be any number between 0 and 1
|
||||
* @param {Object} [config.scale]
|
||||
* @param {Number} [config.scale.x]
|
||||
* @param {Number} [config.scale.y]
|
||||
* @param {Number} [config.rotation] rotation in radians
|
||||
* @param {Number} [config.rotationDeg] rotation in degrees
|
||||
* @param {Object} [config.offset] offset from center point and rotation point
|
||||
* @param {Number} [config.offset.x]
|
||||
* @param {Number} [config.offset.y]
|
||||
* @param {Boolean} [config.draggable]
|
||||
* @param {Function} [config.dragBoundFunc]
|
34
configParams/ShapeParams.txt
Normal file
34
configParams/ShapeParams.txt
Normal file
@@ -0,0 +1,34 @@
|
||||
@param {String} [config.fill] fill color
|
||||
* @param {Image} [config.fillPatternImage] fill pattern image
|
||||
* @param {Number} [config.fillPatternX]
|
||||
* @param {Number} [config.fillPatternY]
|
||||
* @param {Array|Object} [config.fillPatternOffset] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillPatternScale] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillPatternRotation]
|
||||
* @param {String} [config.fillPatternRepeat] can be 'repeat', 'repeat-x', 'repeat-y', or 'no-repeat'. The default is 'no-repeat'
|
||||
@param {Array|Object} [config.fillLinearGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillLinearGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Array} [config.fillLinearGradientColorStops] array of color stops
|
||||
* @param {Array|Object} [config.fillRadialGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillRadialGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillRadialGradientStartRadius]
|
||||
* @param {Number} [config.fillRadialGradientEndRadius]
|
||||
* @param {Array} [config.fillRadialGradientColorStops] array of color stops
|
||||
* @param {Boolean} [config.fillEnabled] flag which enables or disables the fill. The default value is true
|
||||
* @param {String} [config.stroke] stroke color
|
||||
* @param {Number} [config.strokeWidth] stroke width
|
||||
* @param {Boolean} [config.strokeEnabled] flag which enables or disables the stroke. The default value is true
|
||||
* @param {String} [config.lineJoin] can be miter, round, or bevel. The default
|
||||
* is miter
|
||||
* @param {String} [config.lineCap] can be butt, round, or sqare. The default
|
||||
* is butt
|
||||
* @param {String} [config.shadowColor]
|
||||
* @param {Number} [config.shadowBlur]
|
||||
* @param {Obect} [config.shadowOffset]
|
||||
* @param {Number} [config.shadowOffset.x]
|
||||
* @param {Number} [config.shadowOffset.y]
|
||||
* @param {Number} [config.shadowOpacity] shadow opacity. Can be any real number
|
||||
* between 0 and 1
|
||||
* @param {Boolean} [config.shadowEnabled] flag which enables or disables the shadow. The default value is true
|
||||
* @param {Array} [config.dashArray]
|
||||
* @param {Boolean} [config.dashArrayEnabled] flag which enables or disables the dashArray. The default value is true
|
@@ -4,6 +4,7 @@
|
||||
* @constructor
|
||||
* @augments Kinetic.Node
|
||||
* @param {Object} config
|
||||
* {{NodeParams}}
|
||||
*/
|
||||
Kinetic.Container = function(config) {
|
||||
this._containerInit(config);
|
||||
|
@@ -1,9 +1,9 @@
|
||||
/**
|
||||
* KineticJS JavaScript Framework v@version
|
||||
* KineticJS JavaScript Framework v{{version}}
|
||||
* http://www.kineticjs.com/
|
||||
* Copyright 2013, Eric Rowell
|
||||
* Licensed under the MIT or GPL Version 2 licenses.
|
||||
* Date: @date
|
||||
* Date: {{date}}
|
||||
*
|
||||
* Copyright (C) 2011 - 2013 by Eric Rowell
|
||||
*
|
||||
@@ -29,7 +29,7 @@
|
||||
* @namespace
|
||||
*/
|
||||
var Kinetic = {}; (function() {
|
||||
Kinetic.version = '@version';
|
||||
Kinetic.version = '{{version}}';
|
||||
/**
|
||||
* @namespace
|
||||
*/
|
||||
|
23
src/Group.js
23
src/Group.js
@@ -3,27 +3,8 @@
|
||||
* Group constructor. Groups are used to contain shapes or other groups.
|
||||
* @constructor
|
||||
* @augments Kinetic.Container
|
||||
*
|
||||
*
|
||||
* @param {Number} [config.x]
|
||||
* @param {Number} [config.y]
|
||||
* @param {Number} [config.width]
|
||||
* @param {Number} [config.height]
|
||||
* @param {Boolean} [config.visible]
|
||||
* @param {Boolean} [config.listening] whether or not the node is listening for events
|
||||
* @param {String} [config.id] unique id
|
||||
* @param {String} [config.name] non-unique name
|
||||
* @param {Number} [config.opacity] determines node opacity. Can be any number between 0 and 1
|
||||
* @param {Object} [config.scale]
|
||||
* @param {Number} [config.scale.x]
|
||||
* @param {Number} [config.scale.y]
|
||||
* @param {Number} [config.rotation] rotation in radians
|
||||
* @param {Number} [config.rotationDeg] rotation in degrees
|
||||
* @param {Object} [config.offset] offset from center point and rotation point
|
||||
* @param {Number} [config.offset.x]
|
||||
* @param {Number} [config.offset.y]
|
||||
* @param {Boolean} [config.draggable]
|
||||
* @param {Function} [config.dragBoundFunc]
|
||||
* @param {Object} config
|
||||
* {{NodeParams}}
|
||||
*/
|
||||
Kinetic.Group = function(config) {
|
||||
this._initGroup(config);
|
||||
|
21
src/Layer.js
21
src/Layer.js
@@ -7,26 +7,7 @@
|
||||
* @param {Object} config
|
||||
* @param {Boolean} [config.clearBeforeDraw] set this property to false if you don't want
|
||||
* to clear the canvas before each layer draw. The default value is true.
|
||||
*
|
||||
* @param {Number} [config.x]
|
||||
* @param {Number} [config.y]
|
||||
* @param {Number} [config.width]
|
||||
* @param {Number} [config.height]
|
||||
* @param {Boolean} [config.visible]
|
||||
* @param {Boolean} [config.listening] whether or not the node is listening for events
|
||||
* @param {String} [config.id] unique id
|
||||
* @param {String} [config.name] non-unique name
|
||||
* @param {Number} [config.opacity] determines node opacity. Can be any number between 0 and 1
|
||||
* @param {Object} [config.scale]
|
||||
* @param {Number} [config.scale.x]
|
||||
* @param {Number} [config.scale.y]
|
||||
* @param {Number} [config.rotation] rotation in radians
|
||||
* @param {Number} [config.rotationDeg] rotation in degrees
|
||||
* @param {Object} [config.offset] offset from center point and rotation point
|
||||
* @param {Number} [config.offset.x]
|
||||
* @param {Number} [config.offset.y]
|
||||
* @param {Boolean} [config.draggable]
|
||||
* @param {Function} [config.dragBoundFunc]
|
||||
* {{NodeParams}}
|
||||
*/
|
||||
Kinetic.Layer = function(config) {
|
||||
this._initLayer(config);
|
||||
|
20
src/Node.js
20
src/Node.js
@@ -4,25 +4,7 @@
|
||||
* and have bound events. The stage, layers, groups, and shapes all extend Node.
|
||||
* @constructor
|
||||
* @param {Object} config
|
||||
* @param {Number} [config.x]
|
||||
* @param {Number} [config.y]
|
||||
* @param {Number} [config.width]
|
||||
* @param {Number} [config.height]
|
||||
* @param {Boolean} [config.visible]
|
||||
* @param {Boolean} [config.listening] whether or not the node is listening for events
|
||||
* @param {String} [config.id] unique id
|
||||
* @param {String} [config.name] non-unique name
|
||||
* @param {Number} [config.opacity] determines node opacity. Can be any number between 0 and 1
|
||||
* @param {Object} [config.scale]
|
||||
* @param {Number} [config.scale.x]
|
||||
* @param {Number} [config.scale.y]
|
||||
* @param {Number} [config.rotation] rotation in radians
|
||||
* @param {Number} [config.rotationDeg] rotation in degrees
|
||||
* @param {Object} [config.offset] offset from center point and rotation point
|
||||
* @param {Number} [config.offset.x]
|
||||
* @param {Number} [config.offset.y]
|
||||
* @param {Boolean} [config.draggable]
|
||||
* @param {Function} [config.dragBoundFunc]
|
||||
* {{NodeParams}}
|
||||
*/
|
||||
Kinetic.Node = function(config) {
|
||||
this._nodeInit(config);
|
||||
|
55
src/Shape.js
55
src/Shape.js
@@ -5,59 +5,8 @@
|
||||
* @constructor
|
||||
* @augments Kinetic.Node
|
||||
* @param {Object} config
|
||||
* @param {String} [config.fill] fill color
|
||||
* @param {Image} [config.fillPatternImage] fill pattern image
|
||||
* @param {Number} [config.fillPatternX]
|
||||
* @param {Number} [config.fillPatternY]
|
||||
* @param {Array|Object} [config.fillPatternOffset] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillPatternScale] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillPatternRotation]
|
||||
* @param {String} [config.fillPatternRepeat] can be 'repeat', 'repeat-x', 'repeat-y', or 'no-repeat'. The default is 'no-repeat'
|
||||
* @param {Array|Object} [config.fillLinearGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillLinearGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Array} [config.fillLinearGradientColorStops] array of color stops
|
||||
* @param {Array|Object} [config.fillRadialGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillRadialGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillRadialGradientStartRadius]
|
||||
* @param {Number} [config.fillRadialGradientEndRadius]
|
||||
* @param {Array} [config.fillRadialGradientColorStops] array of color stops
|
||||
* @param {Boolean} [config.fillEnabled] flag which enables or disables the fill. The default value is true
|
||||
* @param {String} [config.stroke] stroke color
|
||||
* @param {Number} [config.strokeWidth] stroke width
|
||||
* @param {Boolean} [config.strokeEnabled] flag which enables or disables the stroke. The default value is true
|
||||
* @param {String} [config.lineJoin] can be miter, round, or bevel. The default
|
||||
* is miter
|
||||
* @param {String} [config.lineCap] can be butt, round, or sqare. The default
|
||||
* is butt
|
||||
* @param {String} [config.shadowColor]
|
||||
* @param {Number} [config.shadowBlur]
|
||||
* @param {Obect} [config.shadowOffset]
|
||||
* @param {Number} [config.shadowOffset.x]
|
||||
* @param {Number} [config.shadowOffset.y]
|
||||
* @param {Number} [config.shadowOpacity] shadow opacity. Can be any real number
|
||||
* between 0 and 1
|
||||
* @param {Boolean} [config.shadowEnabled] flag which enables or disables the shadow. The default value is true
|
||||
* @param {Array} [config.dashArray]
|
||||
* @param {Boolean} [config.dashArrayEnabled] flag which enables or disables the dashArray. The default value is true
|
||||
* @param {Number} [config.x]
|
||||
* @param {Number} [config.y]
|
||||
* @param {Number} [config.width]
|
||||
* @param {Number} [config.height]
|
||||
* @param {Boolean} [config.visible]
|
||||
* @param {Boolean} [config.listening] whether or not the node is listening for events
|
||||
* @param {String} [config.id] unique id
|
||||
* @param {String} [config.name] non-unique name
|
||||
* @param {Number} [config.opacity] determines node opacity. Can be any number between 0 and 1
|
||||
* @param {Object} [config.scale]
|
||||
* @param {Number} [config.scale.x]
|
||||
* @param {Number} [config.scale.y]
|
||||
* @param {Number} [config.rotation] rotation in radians
|
||||
* @param {Number} [config.rotationDeg] rotation in degrees
|
||||
* @param {Object} [config.offset] offset from center point and rotation point
|
||||
* @param {Number} [config.offset.x]
|
||||
* @param {Number} [config.offset.y]
|
||||
* @param {Boolean} [config.draggable]
|
||||
* @param {Function} [config.dragBoundFunc]
|
||||
* {{ShapeParams}}
|
||||
* {{NodeParams}}
|
||||
*/
|
||||
Kinetic.Shape = function(config) {
|
||||
this._initShape(config);
|
||||
|
22
src/Stage.js
22
src/Stage.js
@@ -5,27 +5,7 @@
|
||||
* @augments Kinetic.Container
|
||||
* @param {Object} config
|
||||
* @param {String|DomElement} config.container Container id or DOM element
|
||||
*
|
||||
*
|
||||
* @param {Number} [config.x]
|
||||
* @param {Number} [config.y]
|
||||
* @param {Number} [config.width]
|
||||
* @param {Number} [config.height]
|
||||
* @param {Boolean} [config.visible]
|
||||
* @param {Boolean} [config.listening] whether or not the node is listening for events
|
||||
* @param {String} [config.id] unique id
|
||||
* @param {String} [config.name] non-unique name
|
||||
* @param {Number} [config.opacity] determines node opacity. Can be any number between 0 and 1
|
||||
* @param {Object} [config.scale]
|
||||
* @param {Number} [config.scale.x]
|
||||
* @param {Number} [config.scale.y]
|
||||
* @param {Number} [config.rotation] rotation in radians
|
||||
* @param {Number} [config.rotationDeg] rotation in degrees
|
||||
* @param {Object} [config.offset] offset from center point and rotation point
|
||||
* @param {Number} [config.offset.x]
|
||||
* @param {Number} [config.offset.y]
|
||||
* @param {Boolean} [config.draggable]
|
||||
* @param {Function} [config.dragBoundFunc]
|
||||
* {{NodeParams}}
|
||||
*/
|
||||
Kinetic.Stage = function(config) {
|
||||
this._initStage(config);
|
||||
|
@@ -8,55 +8,8 @@
|
||||
* @param {Array} config.points can be a flattened array of points, an array of point arrays, or an array of point objects.
|
||||
* e.g. [0,1,2,3], [[0,1],[2,3]] and [{x:0,y:1},{x:2,y:3}] are equivalent
|
||||
* @param {Number} [config.tension] default value is 1. Higher values will result in a more curvy line. A value of 0 will result in no interpolation.
|
||||
* @param {String} [config.fill] fill color
|
||||
* @param {Image} [config.fillPatternImage] fill pattern image
|
||||
* @param {Number} [config.fillPatternX]
|
||||
* @param {Number} [config.fillPatternY]
|
||||
* @param {Array|Object} [config.fillPatternOffset] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillPatternScale] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillPatternRotation]
|
||||
* @param {String} [config.fillPatternRepeat] can be 'repeat', 'repeat-x', 'repeat-y', or 'no-repeat'. The default is 'no-repeat'
|
||||
* @param {Array|Object} [config.fillLinearGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillLinearGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Array} [config.fillLinearGradientColorStops] array of color stops
|
||||
* @param {Array|Object} [config.fillRadialGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillRadialGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillRadialGradientStartRadius]
|
||||
* @param {Number} [config.fillRadialGradientEndRadius]
|
||||
* @param {Array} [config.fillRadialGradientColorStops] array of color stops
|
||||
* @param {String} [config.stroke] stroke color
|
||||
* @param {Number} [config.strokeWidth] stroke width
|
||||
* @param {String} [config.lineJoin] can be miter, round, or bevel. The default
|
||||
* is miter
|
||||
* @param {String} [config.lineCap] can be butt, round, or sqare. The default
|
||||
* is butt
|
||||
* @param {String} [config.shadowColor]
|
||||
* @param {Number} [config.shadowBlur]
|
||||
* @param {Obect} [config.shadowOffset]
|
||||
* @param {Number} [config.shadowOffset.x]
|
||||
* @param {Number} [config.shadowOffset.y]
|
||||
* @param {Number} [config.shadowOpacity] shadow opacity. Can be any real number
|
||||
* between 0 and 1
|
||||
* @param {Array} [config.dashArray]
|
||||
* @param {Number} [config.x]
|
||||
* @param {Number} [config.y]
|
||||
* @param {Number} [config.width]
|
||||
* @param {Number} [config.height]
|
||||
* @param {Boolean} [config.visible]
|
||||
* @param {Boolean} [config.listening] whether or not the node is listening for events
|
||||
* @param {String} [config.id] unique id
|
||||
* @param {String} [config.name] non-unique name
|
||||
* @param {Number} [config.opacity] determines node opacity. Can be any number between 0 and 1
|
||||
* @param {Object} [config.scale]
|
||||
* @param {Number} [config.scale.x]
|
||||
* @param {Number} [config.scale.y]
|
||||
* @param {Number} [config.rotation] rotation in radians
|
||||
* @param {Number} [config.rotationDeg] rotation in degrees
|
||||
* @param {Object} [config.offset] offset from center point and rotation point
|
||||
* @param {Number} [config.offset.x]
|
||||
* @param {Number} [config.offset.y]
|
||||
* @param {Boolean} [config.draggable]
|
||||
* @param {Function} [config.dragBoundFunc]
|
||||
* {{ShapeParams}}
|
||||
* {{NodeParams}}
|
||||
*/
|
||||
Kinetic.Blob = function(config) {
|
||||
this._initBlob(config);
|
||||
|
@@ -5,58 +5,8 @@
|
||||
* @augments Kinetic.Shape
|
||||
* @param {Object} config
|
||||
* @param {Number} config.radius
|
||||
* @param {String} [config.fill] fill color
|
||||
* @param {Image} [config.fillPatternImage] fill pattern image
|
||||
* @param {Number} [config.fillPatternX]
|
||||
* @param {Number} [config.fillPatternY]
|
||||
* @param {Array|Object} [config.fillPatternOffset] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillPatternScale] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillPatternRotation]
|
||||
* @param {String} [config.fillPatternRepeat] can be 'repeat', 'repeat-x', 'repeat-y', or 'no-repeat'. The default is 'no-repeat'
|
||||
* @param {Array|Object} [config.fillLinearGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillLinearGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Array} [config.fillLinearGradientColorStops] array of color stops
|
||||
* @param {Array|Object} [config.fillRadialGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillRadialGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillRadialGradientStartRadius]
|
||||
* @param {Number} [config.fillRadialGradientEndRadius]
|
||||
* @param {Array} [config.fillRadialGradientColorStops] array of color stops
|
||||
* @param {String} [config.stroke] stroke color
|
||||
* @param {Number} [config.strokeWidth] stroke width
|
||||
* @param {String} [config.lineJoin] can be miter, round, or bevel. The default
|
||||
* is miter
|
||||
* @param {String} [config.lineCap] can be butt, round, or sqare. The default
|
||||
* is butt
|
||||
* @param {String} [config.shadowColor]
|
||||
* @param {Number} [config.shadowBlur]
|
||||
* @param {Obect} [config.shadowOffset]
|
||||
* @param {Number} [config.shadowOffset.x]
|
||||
* @param {Number} [config.shadowOffset.y]
|
||||
* @param {Number} [config.shadowOpacity] shadow opacity. Can be any real number
|
||||
* between 0 and 1
|
||||
* @param {Array} [config.dashArray]
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param {Number} [config.x]
|
||||
* @param {Number} [config.y]
|
||||
* @param {Number} [config.width]
|
||||
* @param {Number} [config.height]
|
||||
* @param {Boolean} [config.visible]
|
||||
* @param {Boolean} [config.listening] whether or not the node is listening for events
|
||||
* @param {String} [config.id] unique id
|
||||
* @param {String} [config.name] non-unique name
|
||||
* @param {Number} [config.opacity] determines node opacity. Can be any number between 0 and 1
|
||||
* @param {Object} [config.scale]
|
||||
* @param {Number} [config.scale.x]
|
||||
* @param {Number} [config.scale.y]
|
||||
* @param {Number} [config.rotation] rotation in radians
|
||||
* @param {Number} [config.rotationDeg] rotation in degrees
|
||||
* @param {Object} [config.offset] offset from center point and rotation point
|
||||
* @param {Number} [config.offset.x]
|
||||
* @param {Number} [config.offset.y]
|
||||
* @param {Boolean} [config.draggable]
|
||||
* @param {Function} [config.dragBoundFunc]
|
||||
* {{ShapeParams}}
|
||||
* {{NodeParams}}
|
||||
*/
|
||||
Kinetic.Circle = function(config) {
|
||||
this._initCircle(config);
|
||||
|
@@ -5,64 +5,8 @@
|
||||
* @augments Kinetic.Shape
|
||||
* @param {Object} config
|
||||
* @param {Number|Array|Object} config.radius defines x and y radius
|
||||
*
|
||||
*
|
||||
* @param {String} [config.fill] fill color
|
||||
*
|
||||
* @param {Image} [config.fillPatternImage] fill pattern image
|
||||
* @param {Number} [config.fillPatternX]
|
||||
* @param {Number} [config.fillPatternY]
|
||||
* @param {Array|Object} [config.fillPatternOffset] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillPatternScale] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillPatternRotation]
|
||||
* @param {String} [config.fillPatternRepeat] can be 'repeat', 'repeat-x', 'repeat-y', or 'no-repeat'. The default is 'no-repeat'
|
||||
*
|
||||
* @param {Array|Object} [config.fillLinearGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillLinearGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Array} [config.fillLinearGradientColorStops] array of color stops
|
||||
*
|
||||
* @param {Array|Object} [config.fillRadialGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillRadialGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillRadialGradientStartRadius]
|
||||
* @param {Number} [config.fillRadialGradientEndRadius]
|
||||
* @param {Array} [config.fillRadialGradientColorStops] array of color stops
|
||||
*
|
||||
* @param {String} [config.stroke] stroke color
|
||||
* @param {Number} [config.strokeWidth] stroke width
|
||||
* @param {String} [config.lineJoin] can be miter, round, or bevel. The default
|
||||
* is miter
|
||||
* @param {String} [config.lineCap] can be butt, round, or sqare. The default
|
||||
* is butt
|
||||
* @param {String} [config.shadowColor]
|
||||
* @param {Number} [config.shadowBlur]
|
||||
* @param {Obect} [config.shadowOffset]
|
||||
* @param {Number} [config.shadowOffset.x]
|
||||
* @param {Number} [config.shadowOffset.y]
|
||||
* @param {Number} [config.shadowOpacity] shadow opacity. Can be any real number
|
||||
* between 0 and 1
|
||||
* @param {Array} [config.dashArray]
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param {Number} [config.x]
|
||||
* @param {Number} [config.y]
|
||||
* @param {Number} [config.width]
|
||||
* @param {Number} [config.height]
|
||||
* @param {Boolean} [config.visible]
|
||||
* @param {Boolean} [config.listening] whether or not the node is listening for events
|
||||
* @param {String} [config.id] unique id
|
||||
* @param {String} [config.name] non-unique name
|
||||
* @param {Number} [config.opacity] determines node opacity. Can be any number between 0 and 1
|
||||
* @param {Object} [config.scale]
|
||||
* @param {Number} [config.scale.x]
|
||||
* @param {Number} [config.scale.y]
|
||||
* @param {Number} [config.rotation] rotation in radians
|
||||
* @param {Number} [config.rotationDeg] rotation in degrees
|
||||
* @param {Object} [config.offset] offset from center point and rotation point
|
||||
* @param {Number} [config.offset.x]
|
||||
* @param {Number} [config.offset.y]
|
||||
* @param {Boolean} [config.draggable]
|
||||
* @param {Function} [config.dragBoundFunc]
|
||||
* {{ShapeParams}}
|
||||
* {{NodeParams}}
|
||||
*/
|
||||
Kinetic.Ellipse = function(config) {
|
||||
this._initEllipse(config);
|
||||
|
@@ -6,64 +6,8 @@
|
||||
* @param {Object} config
|
||||
* @param {ImageObject} config.image
|
||||
* @param {Object} [config.crop]
|
||||
*
|
||||
*
|
||||
* @param {String} [config.fill] fill color
|
||||
*
|
||||
* @param {Image} [config.fillPatternImage] fill pattern image
|
||||
* @param {Number} [config.fillPatternX]
|
||||
* @param {Number} [config.fillPatternY]
|
||||
* @param {Array|Object} [config.fillPatternOffset] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillPatternScale] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillPatternRotation]
|
||||
* @param {String} [config.fillPatternRepeat] can be 'repeat', 'repeat-x', 'repeat-y', or 'no-repeat'. The default is 'no-repeat'
|
||||
*
|
||||
* @param {Array|Object} [config.fillLinearGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillLinearGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Array} [config.fillLinearGradientColorStops] array of color stops
|
||||
*
|
||||
* @param {Array|Object} [config.fillRadialGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillRadialGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillRadialGradientStartRadius]
|
||||
* @param {Number} [config.fillRadialGradientEndRadius]
|
||||
* @param {Array} [config.fillRadialGradientColorStops] array of color stops
|
||||
*
|
||||
* @param {String} [config.stroke] stroke color
|
||||
* @param {Number} [config.strokeWidth] stroke width
|
||||
* @param {String} [config.lineJoin] can be miter, round, or bevel. The default
|
||||
* is miter
|
||||
* @param {String} [config.lineCap] can be butt, round, or sqare. The default
|
||||
* is butt
|
||||
* @param {String} [config.shadowColor]
|
||||
* @param {Number} [config.shadowBlur]
|
||||
* @param {Obect} [config.shadowOffset]
|
||||
* @param {Number} [config.shadowOffset.x]
|
||||
* @param {Number} [config.shadowOffset.y]
|
||||
* @param {Number} [config.shadowOpacity] shadow opacity. Can be any real number
|
||||
* between 0 and 1
|
||||
* @param {Array} [config.dashArray]
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param {Number} [config.x]
|
||||
* @param {Number} [config.y]
|
||||
* @param {Number} [config.width]
|
||||
* @param {Number} [config.height]
|
||||
* @param {Boolean} [config.visible]
|
||||
* @param {Boolean} [config.listening] whether or not the node is listening for events
|
||||
* @param {String} [config.id] unique id
|
||||
* @param {String} [config.name] non-unique name
|
||||
* @param {Number} [config.opacity] determines node opacity. Can be any number between 0 and 1
|
||||
* @param {Object} [config.scale]
|
||||
* @param {Number} [config.scale.x]
|
||||
* @param {Number} [config.scale.y]
|
||||
* @param {Number} [config.rotation] rotation in radians
|
||||
* @param {Number} [config.rotationDeg] rotation in degrees
|
||||
* @param {Object} [config.offset] offset from center point and rotation point
|
||||
* @param {Number} [config.offset.x]
|
||||
* @param {Number} [config.offset.y]
|
||||
* @param {Boolean} [config.draggable]
|
||||
* @param {Function} [config.dragBoundFunc]
|
||||
* {{ShapeParams}}
|
||||
* {{NodeParams}}
|
||||
*/
|
||||
Kinetic.Image = function(config) {
|
||||
this._initImage(config);
|
||||
|
@@ -6,64 +6,8 @@
|
||||
* @param {Object} config
|
||||
* @param {Array} config.points can be a flattened array of points, an array of point arrays, or an array of point objects.
|
||||
* e.g. [0,1,2,3], [[0,1],[2,3]] and [{x:0,y:1},{x:2,y:3}] are equivalent
|
||||
*
|
||||
*
|
||||
* @param {String} [config.fill] fill color
|
||||
*
|
||||
* @param {Image} [config.fillPatternImage] fill pattern image
|
||||
* @param {Number} [config.fillPatternX]
|
||||
* @param {Number} [config.fillPatternY]
|
||||
* @param {Array|Object} [config.fillPatternOffset] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillPatternScale] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillPatternRotation]
|
||||
* @param {String} [config.fillPatternRepeat] can be 'repeat', 'repeat-x', 'repeat-y', or 'no-repeat'. The default is 'no-repeat'
|
||||
*
|
||||
* @param {Array|Object} [config.fillLinearGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillLinearGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Array} [config.fillLinearGradientColorStops] array of color stops
|
||||
*
|
||||
* @param {Array|Object} [config.fillRadialGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillRadialGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillRadialGradientStartRadius]
|
||||
* @param {Number} [config.fillRadialGradientEndRadius]
|
||||
* @param {Array} [config.fillRadialGradientColorStops] array of color stops
|
||||
*
|
||||
* @param {String} [config.stroke] stroke color
|
||||
* @param {Number} [config.strokeWidth] stroke width
|
||||
* @param {String} [config.lineJoin] can be miter, round, or bevel. The default
|
||||
* is miter
|
||||
* @param {String} [config.lineCap] can be butt, round, or sqare. The default
|
||||
* is butt
|
||||
* @param {String} [config.shadowColor]
|
||||
* @param {Number} [config.shadowBlur]
|
||||
* @param {Obect} [config.shadowOffset]
|
||||
* @param {Number} [config.shadowOffset.x]
|
||||
* @param {Number} [config.shadowOffset.y]
|
||||
* @param {Number} [config.shadowOpacity] shadow opacity. Can be any real number
|
||||
* between 0 and 1
|
||||
* @param {Array} [config.dashArray]
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param {Number} [config.x]
|
||||
* @param {Number} [config.y]
|
||||
* @param {Number} [config.width]
|
||||
* @param {Number} [config.height]
|
||||
* @param {Boolean} [config.visible]
|
||||
* @param {Boolean} [config.listening] whether or not the node is listening for events
|
||||
* @param {String} [config.id] unique id
|
||||
* @param {String} [config.name] non-unique name
|
||||
* @param {Number} [config.opacity] determines node opacity. Can be any number between 0 and 1
|
||||
* @param {Object} [config.scale]
|
||||
* @param {Number} [config.scale.x]
|
||||
* @param {Number} [config.scale.y]
|
||||
* @param {Number} [config.rotation] rotation in radians
|
||||
* @param {Number} [config.rotationDeg] rotation in degrees
|
||||
* @param {Object} [config.offset] offset from center point and rotation point
|
||||
* @param {Number} [config.offset.x]
|
||||
* @param {Number} [config.offset.y]
|
||||
* @param {Boolean} [config.draggable]
|
||||
* @param {Function} [config.dragBoundFunc]
|
||||
* {{ShapeParams}}
|
||||
* {{NodeParams}}
|
||||
*/
|
||||
Kinetic.Line = function(config) {
|
||||
this._initLine(config);
|
||||
|
@@ -6,64 +6,8 @@
|
||||
* @augments Kinetic.Shape
|
||||
* @param {Object} config
|
||||
* @param {String} config.data SVG data string
|
||||
*
|
||||
*
|
||||
* @param {String} [config.fill] fill color
|
||||
*
|
||||
* @param {Image} [config.fillPatternImage] fill pattern image
|
||||
* @param {Number} [config.fillPatternX]
|
||||
* @param {Number} [config.fillPatternY]
|
||||
* @param {Array|Object} [config.fillPatternOffset] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillPatternScale] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillPatternRotation]
|
||||
* @param {String} [config.fillPatternRepeat] can be 'repeat', 'repeat-x', 'repeat-y', or 'no-repeat'. The default is 'no-repeat'
|
||||
*
|
||||
* @param {Array|Object} [config.fillLinearGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillLinearGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Array} [config.fillLinearGradientColorStops] array of color stops
|
||||
*
|
||||
* @param {Array|Object} [config.fillRadialGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillRadialGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillRadialGradientStartRadius]
|
||||
* @param {Number} [config.fillRadialGradientEndRadius]
|
||||
* @param {Array} [config.fillRadialGradientColorStops] array of color stops
|
||||
*
|
||||
* @param {String} [config.stroke] stroke color
|
||||
* @param {Number} [config.strokeWidth] stroke width
|
||||
* @param {String} [config.lineJoin] can be miter, round, or bevel. The default
|
||||
* is miter
|
||||
* @param {String} [config.lineCap] can be butt, round, or sqare. The default
|
||||
* is butt
|
||||
* @param {String} [config.shadowColor]
|
||||
* @param {Number} [config.shadowBlur]
|
||||
* @param {Obect} [config.shadowOffset]
|
||||
* @param {Number} [config.shadowOffset.x]
|
||||
* @param {Number} [config.shadowOffset.y]
|
||||
* @param {Number} [config.shadowOpacity] shadow opacity. Can be any real number
|
||||
* between 0 and 1
|
||||
* @param {Array} [config.dashArray]
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param {Number} [config.x]
|
||||
* @param {Number} [config.y]
|
||||
* @param {Number} [config.width]
|
||||
* @param {Number} [config.height]
|
||||
* @param {Boolean} [config.visible]
|
||||
* @param {Boolean} [config.listening] whether or not the node is listening for events
|
||||
* @param {String} [config.id] unique id
|
||||
* @param {String} [config.name] non-unique name
|
||||
* @param {Number} [config.opacity] determines node opacity. Can be any number between 0 and 1
|
||||
* @param {Object} [config.scale]
|
||||
* @param {Number} [config.scale.x]
|
||||
* @param {Number} [config.scale.y]
|
||||
* @param {Number} [config.rotation] rotation in radians
|
||||
* @param {Number} [config.rotationDeg] rotation in degrees
|
||||
* @param {Object} [config.offset] offset from center point and rotation point
|
||||
* @param {Number} [config.offset.x]
|
||||
* @param {Number} [config.offset.y]
|
||||
* @param {Boolean} [config.draggable]
|
||||
* @param {Function} [config.dragBoundFunc]
|
||||
* {{ShapeParams}}
|
||||
* {{NodeParams}}
|
||||
*/
|
||||
Kinetic.Path = function(config) {
|
||||
this._initPath(config);
|
||||
|
@@ -6,64 +6,8 @@
|
||||
* @param {Object} config
|
||||
* @param {Array} config.points can be a flattened array of points, an array of point arrays, or an array of point objects.
|
||||
* e.g. [0,1,2,3], [[0,1],[2,3]] and [{x:0,y:1},{x:2,y:3}] are equivalent
|
||||
*
|
||||
*
|
||||
* @param {String} [config.fill] fill color
|
||||
*
|
||||
* @param {Image} [config.fillPatternImage] fill pattern image
|
||||
* @param {Number} [config.fillPatternX]
|
||||
* @param {Number} [config.fillPatternY]
|
||||
* @param {Array|Object} [config.fillPatternOffset] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillPatternScale] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillPatternRotation]
|
||||
* @param {String} [config.fillPatternRepeat] can be 'repeat', 'repeat-x', 'repeat-y', or 'no-repeat'. The default is 'no-repeat'
|
||||
*
|
||||
* @param {Array|Object} [config.fillLinearGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillLinearGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Array} [config.fillLinearGradientColorStops] array of color stops
|
||||
*
|
||||
* @param {Array|Object} [config.fillRadialGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillRadialGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillRadialGradientStartRadius]
|
||||
* @param {Number} [config.fillRadialGradientEndRadius]
|
||||
* @param {Array} [config.fillRadialGradientColorStops] array of color stops
|
||||
*
|
||||
* @param {String} [config.stroke] stroke color
|
||||
* @param {Number} [config.strokeWidth] stroke width
|
||||
* @param {String} [config.lineJoin] can be miter, round, or bevel. The default
|
||||
* is miter
|
||||
* @param {String} [config.lineCap] can be butt, round, or sqare. The default
|
||||
* is butt
|
||||
* @param {String} [config.shadowColor]
|
||||
* @param {Number} [config.shadowBlur]
|
||||
* @param {Obect} [config.shadowOffset]
|
||||
* @param {Number} [config.shadowOffset.x]
|
||||
* @param {Number} [config.shadowOffset.y]
|
||||
* @param {Number} [config.shadowOpacity] shadow opacity. Can be any real number
|
||||
* between 0 and 1
|
||||
* @param {Array} [config.dashArray]
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param {Number} [config.x]
|
||||
* @param {Number} [config.y]
|
||||
* @param {Number} [config.width]
|
||||
* @param {Number} [config.height]
|
||||
* @param {Boolean} [config.visible]
|
||||
* @param {Boolean} [config.listening] whether or not the node is listening for events
|
||||
* @param {String} [config.id] unique id
|
||||
* @param {String} [config.name] non-unique name
|
||||
* @param {Number} [config.opacity] determines node opacity. Can be any number between 0 and 1
|
||||
* @param {Object} [config.scale]
|
||||
* @param {Number} [config.scale.x]
|
||||
* @param {Number} [config.scale.y]
|
||||
* @param {Number} [config.rotation] rotation in radians
|
||||
* @param {Number} [config.rotationDeg] rotation in degrees
|
||||
* @param {Object} [config.offset] offset from center point and rotation point
|
||||
* @param {Number} [config.offset.x]
|
||||
* @param {Number} [config.offset.y]
|
||||
* @param {Boolean} [config.draggable]
|
||||
* @param {Function} [config.dragBoundFunc]
|
||||
* {{ShapeParams}}
|
||||
* {{NodeParams}}
|
||||
*/
|
||||
Kinetic.Polygon = function(config) {
|
||||
this._initPolygon(config);
|
||||
|
@@ -5,60 +5,8 @@
|
||||
* @augments Kinetic.Shape
|
||||
* @param {Object} config
|
||||
* @param {Number} [config.cornerRadius]
|
||||
*
|
||||
|
||||
* @param {String} [config.fill] fill color
|
||||
* @param {Image} [config.fillPatternImage] fill pattern image
|
||||
* @param {Number} [config.fillPatternX]
|
||||
* @param {Number} [config.fillPatternY]
|
||||
* @param {Array|Object} [config.fillPatternOffset] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillPatternScale] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillPatternRotation]
|
||||
* @param {String} [config.fillPatternRepeat] can be 'repeat', 'repeat-x', 'repeat-y', or 'no-repeat'. The default is 'no-repeat'
|
||||
* @param {Array|Object} [config.fillLinearGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillLinearGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Array} [config.fillLinearGradientColorStops] array of color stops
|
||||
* @param {Array|Object} [config.fillRadialGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillRadialGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillRadialGradientStartRadius]
|
||||
* @param {Number} [config.fillRadialGradientEndRadius]
|
||||
* @param {Array} [config.fillRadialGradientColorStops] array of color stops
|
||||
* @param {String} [config.stroke] stroke color
|
||||
* @param {Number} [config.strokeWidth] stroke width
|
||||
* @param {String} [config.lineJoin] can be miter, round, or bevel. The default
|
||||
* is miter
|
||||
* @param {String} [config.lineCap] can be butt, round, or sqare. The default
|
||||
* is butt
|
||||
* @param {String} [config.shadowColor]
|
||||
* @param {Number} [config.shadowBlur]
|
||||
* @param {Obect} [config.shadowOffset]
|
||||
* @param {Number} [config.shadowOffset.x]
|
||||
* @param {Number} [config.shadowOffset.y]
|
||||
* @param {Number} [config.shadowOpacity] shadow opacity. Can be any real number
|
||||
* between 0 and 1
|
||||
* @param {Array} [config.dashArray]
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param {Number} [config.x]
|
||||
* @param {Number} [config.y]
|
||||
* @param {Number} [config.width]
|
||||
* @param {Number} [config.height]
|
||||
* @param {Boolean} [config.visible]
|
||||
* @param {Boolean} [config.listening] whether or not the node is listening for events
|
||||
* @param {String} [config.id] unique id
|
||||
* @param {String} [config.name] non-unique name
|
||||
* @param {Number} [config.opacity] determines node opacity. Can be any number between 0 and 1
|
||||
* @param {Object} [config.scale]
|
||||
* @param {Number} [config.scale.x]
|
||||
* @param {Number} [config.scale.y]
|
||||
* @param {Number} [config.rotation] rotation in radians
|
||||
* @param {Number} [config.rotationDeg] rotation in degrees
|
||||
* @param {Object} [config.offset] offset from center point and rotation point
|
||||
* @param {Number} [config.offset.x]
|
||||
* @param {Number} [config.offset.y]
|
||||
* @param {Boolean} [config.draggable]
|
||||
* @param {Function} [config.dragBoundFunc]
|
||||
* {{ShapeParams}}
|
||||
* {{NodeParams}}
|
||||
*/
|
||||
Kinetic.Rect = function(config) {
|
||||
this._initRect(config);
|
||||
|
@@ -6,64 +6,8 @@
|
||||
* @param {Object} config
|
||||
* @param {Number} config.sides
|
||||
* @param {Number} config.radius
|
||||
*
|
||||
*
|
||||
* @param {String} [config.fill] fill color
|
||||
*
|
||||
* @param {Image} [config.fillPatternImage] fill pattern image
|
||||
* @param {Number} [config.fillPatternX]
|
||||
* @param {Number} [config.fillPatternY]
|
||||
* @param {Array|Object} [config.fillPatternOffset] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillPatternScale] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillPatternRotation]
|
||||
* @param {String} [config.fillPatternRepeat] can be 'repeat', 'repeat-x', 'repeat-y', or 'no-repeat'. The default is 'no-repeat'
|
||||
*
|
||||
* @param {Array|Object} [config.fillLinearGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillLinearGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Array} [config.fillLinearGradientColorStops] array of color stops
|
||||
*
|
||||
* @param {Array|Object} [config.fillRadialGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillRadialGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillRadialGradientStartRadius]
|
||||
* @param {Number} [config.fillRadialGradientEndRadius]
|
||||
* @param {Array} [config.fillRadialGradientColorStops] array of color stops
|
||||
*
|
||||
* @param {String} [config.stroke] stroke color
|
||||
* @param {Number} [config.strokeWidth] stroke width
|
||||
* @param {String} [config.lineJoin] can be miter, round, or bevel. The default
|
||||
* is miter
|
||||
* @param {String} [config.lineCap] can be butt, round, or sqare. The default
|
||||
* is butt
|
||||
* @param {String} [config.shadowColor]
|
||||
* @param {Number} [config.shadowBlur]
|
||||
* @param {Obect} [config.shadowOffset]
|
||||
* @param {Number} [config.shadowOffset.x]
|
||||
* @param {Number} [config.shadowOffset.y]
|
||||
* @param {Number} [config.shadowOpacity] shadow opacity. Can be any real number
|
||||
* between 0 and 1
|
||||
* @param {Array} [config.dashArray]
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param {Number} [config.x]
|
||||
* @param {Number} [config.y]
|
||||
* @param {Number} [config.width]
|
||||
* @param {Number} [config.height]
|
||||
* @param {Boolean} [config.visible]
|
||||
* @param {Boolean} [config.listening] whether or not the node is listening for events
|
||||
* @param {String} [config.id] unique id
|
||||
* @param {String} [config.name] non-unique name
|
||||
* @param {Number} [config.opacity] determines node opacity. Can be any number between 0 and 1
|
||||
* @param {Object} [config.scale]
|
||||
* @param {Number} [config.scale.x]
|
||||
* @param {Number} [config.scale.y]
|
||||
* @param {Number} [config.rotation] rotation in radians
|
||||
* @param {Number} [config.rotationDeg] rotation in degrees
|
||||
* @param {Object} [config.offset] offset from center point and rotation point
|
||||
* @param {Number} [config.offset.x]
|
||||
* @param {Number} [config.offset.y]
|
||||
* @param {Boolean} [config.draggable]
|
||||
* @param {Function} [config.dragBoundFunc]
|
||||
* {{ShapeParams}}
|
||||
* {{NodeParams}}
|
||||
*/
|
||||
Kinetic.RegularPolygon = function(config) {
|
||||
this._initRegularPolygon(config);
|
||||
|
@@ -8,64 +8,8 @@
|
||||
* @param {Array} config.points can be a flattened array of points, an array of point arrays, or an array of point objects.
|
||||
* e.g. [0,1,2,3], [[0,1],[2,3]] and [{x:0,y:1},{x:2,y:3}] are equivalent
|
||||
* @param {Number} [config.tension] default value is 1. Higher values will result in a more curvy line. A value of 0 will result in no interpolation.
|
||||
*
|
||||
*
|
||||
* @param {String} [config.fill] fill color
|
||||
*
|
||||
* @param {Image} [config.fillPatternImage] fill pattern image
|
||||
* @param {Number} [config.fillPatternX]
|
||||
* @param {Number} [config.fillPatternY]
|
||||
* @param {Array|Object} [config.fillPatternOffset] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillPatternScale] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillPatternRotation]
|
||||
* @param {String} [config.fillPatternRepeat] can be 'repeat', 'repeat-x', 'repeat-y', or 'no-repeat'. The default is 'no-repeat'
|
||||
*
|
||||
* @param {Array|Object} [config.fillLinearGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillLinearGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Array} [config.fillLinearGradientColorStops] array of color stops
|
||||
*
|
||||
* @param {Array|Object} [config.fillRadialGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillRadialGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillRadialGradientStartRadius]
|
||||
* @param {Number} [config.fillRadialGradientEndRadius]
|
||||
* @param {Array} [config.fillRadialGradientColorStops] array of color stops
|
||||
*
|
||||
* @param {String} [config.stroke] stroke color
|
||||
* @param {Number} [config.strokeWidth] stroke width
|
||||
* @param {String} [config.lineJoin] can be miter, round, or bevel. The default
|
||||
* is miter
|
||||
* @param {String} [config.lineCap] can be butt, round, or sqare. The default
|
||||
* is butt
|
||||
* @param {String} [config.shadowColor]
|
||||
* @param {Number} [config.shadowBlur]
|
||||
* @param {Obect} [config.shadowOffset]
|
||||
* @param {Number} [config.shadowOffset.x]
|
||||
* @param {Number} [config.shadowOffset.y]
|
||||
* @param {Number} [config.shadowOpacity] shadow opacity. Can be any real number
|
||||
* between 0 and 1
|
||||
* @param {Array} [config.dashArray]
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param {Number} [config.x]
|
||||
* @param {Number} [config.y]
|
||||
* @param {Number} [config.width]
|
||||
* @param {Number} [config.height]
|
||||
* @param {Boolean} [config.visible]
|
||||
* @param {Boolean} [config.listening] whether or not the node is listening for events
|
||||
* @param {String} [config.id] unique id
|
||||
* @param {String} [config.name] non-unique name
|
||||
* @param {Number} [config.opacity] determines node opacity. Can be any number between 0 and 1
|
||||
* @param {Object} [config.scale]
|
||||
* @param {Number} [config.scale.x]
|
||||
* @param {Number} [config.scale.y]
|
||||
* @param {Number} [config.rotation] rotation in radians
|
||||
* @param {Number} [config.rotationDeg] rotation in degrees
|
||||
* @param {Object} [config.offset] offset from center point and rotation point
|
||||
* @param {Number} [config.offset.x]
|
||||
* @param {Number} [config.offset.y]
|
||||
* @param {Boolean} [config.draggable]
|
||||
* @param {Function} [config.dragBoundFunc]
|
||||
* {{ShapeParams}}
|
||||
* {{NodeParams}}
|
||||
*/
|
||||
Kinetic.Spline = function(config) {
|
||||
this._initSpline(config);
|
||||
|
@@ -7,64 +7,8 @@
|
||||
* @param {String} config.animation animation key
|
||||
* @param {Object} config.animations animation map
|
||||
* @param {Integer} [config.index] animation index
|
||||
*
|
||||
*
|
||||
* @param {String} [config.fill] fill color
|
||||
*
|
||||
* @param {Image} [config.fillPatternImage] fill pattern image
|
||||
* @param {Number} [config.fillPatternX]
|
||||
* @param {Number} [config.fillPatternY]
|
||||
* @param {Array|Object} [config.fillPatternOffset] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillPatternScale] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillPatternRotation]
|
||||
* @param {String} [config.fillPatternRepeat] can be 'repeat', 'repeat-x', 'repeat-y', or 'no-repeat'. The default is 'no-repeat'
|
||||
*
|
||||
* @param {Array|Object} [config.fillLinearGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillLinearGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Array} [config.fillLinearGradientColorStops] array of color stops
|
||||
*
|
||||
* @param {Array|Object} [config.fillRadialGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillRadialGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillRadialGradientStartRadius]
|
||||
* @param {Number} [config.fillRadialGradientEndRadius]
|
||||
* @param {Array} [config.fillRadialGradientColorStops] array of color stops
|
||||
*
|
||||
* @param {String} [config.stroke] stroke color
|
||||
* @param {Number} [config.strokeWidth] stroke width
|
||||
* @param {String} [config.lineJoin] can be miter, round, or bevel. The default
|
||||
* is miter
|
||||
* @param {String} [config.lineCap] can be butt, round, or sqare. The default
|
||||
* is butt
|
||||
* @param {String} [config.shadowColor]
|
||||
* @param {Number} [config.shadowBlur]
|
||||
* @param {Obect} [config.shadowOffset]
|
||||
* @param {Number} [config.shadowOffset.x]
|
||||
* @param {Number} [config.shadowOffset.y]
|
||||
* @param {Number} [config.shadowOpacity] shadow opacity. Can be any real number
|
||||
* between 0 and 1
|
||||
* @param {Array} [config.dashArray]
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param {Number} [config.x]
|
||||
* @param {Number} [config.y]
|
||||
* @param {Number} [config.width]
|
||||
* @param {Number} [config.height]
|
||||
* @param {Boolean} [config.visible]
|
||||
* @param {Boolean} [config.listening] whether or not the node is listening for events
|
||||
* @param {String} [config.id] unique id
|
||||
* @param {String} [config.name] non-unique name
|
||||
* @param {Number} [config.opacity] determines node opacity. Can be any number between 0 and 1
|
||||
* @param {Object} [config.scale]
|
||||
* @param {Number} [config.scale.x]
|
||||
* @param {Number} [config.scale.y]
|
||||
* @param {Number} [config.rotation] rotation in radians
|
||||
* @param {Number} [config.rotationDeg] rotation in degrees
|
||||
* @param {Object} [config.offset] offset from center point and rotation point
|
||||
* @param {Number} [config.offset.x]
|
||||
* @param {Number} [config.offset.y]
|
||||
* @param {Boolean} [config.draggable]
|
||||
* @param {Function} [config.dragBoundFunc]
|
||||
* {{ShapeParams}}
|
||||
* {{NodeParams}}
|
||||
*/
|
||||
Kinetic.Sprite = function(config) {
|
||||
this._initSprite(config);
|
||||
|
@@ -7,64 +7,8 @@
|
||||
* @param {Integer} config.numPoints
|
||||
* @param {Number} config.innerRadius
|
||||
* @param {Number} config.outerRadius
|
||||
*
|
||||
*
|
||||
* @param {String} [config.fill] fill color
|
||||
*
|
||||
* @param {Image} [config.fillPatternImage] fill pattern image
|
||||
* @param {Number} [config.fillPatternX]
|
||||
* @param {Number} [config.fillPatternY]
|
||||
* @param {Array|Object} [config.fillPatternOffset] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillPatternScale] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillPatternRotation]
|
||||
* @param {String} [config.fillPatternRepeat] can be 'repeat', 'repeat-x', 'repeat-y', or 'no-repeat'. The default is 'no-repeat'
|
||||
*
|
||||
* @param {Array|Object} [config.fillLinearGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillLinearGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Array} [config.fillLinearGradientColorStops] array of color stops
|
||||
*
|
||||
* @param {Array|Object} [config.fillRadialGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillRadialGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillRadialGradientStartRadius]
|
||||
* @param {Number} [config.fillRadialGradientEndRadius]
|
||||
* @param {Array} [config.fillRadialGradientColorStops] array of color stops
|
||||
*
|
||||
* @param {String} [config.stroke] stroke color
|
||||
* @param {Number} [config.strokeWidth] stroke width
|
||||
* @param {String} [config.lineJoin] can be miter, round, or bevel. The default
|
||||
* is miter
|
||||
* @param {String} [config.lineCap] can be butt, round, or sqare. The default
|
||||
* is butt
|
||||
* @param {String} [config.shadowColor]
|
||||
* @param {Number} [config.shadowBlur]
|
||||
* @param {Obect} [config.shadowOffset]
|
||||
* @param {Number} [config.shadowOffset.x]
|
||||
* @param {Number} [config.shadowOffset.y]
|
||||
* @param {Number} [config.shadowOpacity] shadow opacity. Can be any real number
|
||||
* between 0 and 1
|
||||
* @param {Array} [config.dashArray]
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param {Number} [config.x]
|
||||
* @param {Number} [config.y]
|
||||
* @param {Number} [config.width]
|
||||
* @param {Number} [config.height]
|
||||
* @param {Boolean} [config.visible]
|
||||
* @param {Boolean} [config.listening] whether or not the node is listening for events
|
||||
* @param {String} [config.id] unique id
|
||||
* @param {String} [config.name] non-unique name
|
||||
* @param {Number} [config.opacity] determines node opacity. Can be any number between 0 and 1
|
||||
* @param {Object} [config.scale]
|
||||
* @param {Number} [config.scale.x]
|
||||
* @param {Number} [config.scale.y]
|
||||
* @param {Number} [config.rotation] rotation in radians
|
||||
* @param {Number} [config.rotationDeg] rotation in degrees
|
||||
* @param {Object} [config.offset] offset from center point and rotation point
|
||||
* @param {Number} [config.offset.x]
|
||||
* @param {Number} [config.offset.y]
|
||||
* @param {Boolean} [config.draggable]
|
||||
* @param {Function} [config.dragBoundFunc]
|
||||
* {{ShapeParams}}
|
||||
* {{NodeParams}}
|
||||
*/
|
||||
Kinetic.Star = function(config) {
|
||||
this._initStar(config);
|
||||
|
@@ -13,64 +13,8 @@
|
||||
* @param {Number} [config.width] default is auto
|
||||
* @param {Number} [config.height] default is auto
|
||||
* @param {Number} [config.lineHeight] default is 1
|
||||
*
|
||||
*
|
||||
* @param {String} [config.fill] fill color
|
||||
*
|
||||
* @param {Image} [config.fillPatternImage] fill pattern image
|
||||
* @param {Number} [config.fillPatternX]
|
||||
* @param {Number} [config.fillPatternY]
|
||||
* @param {Array|Object} [config.fillPatternOffset] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillPatternScale] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillPatternRotation]
|
||||
* @param {String} [config.fillPatternRepeat] can be 'repeat', 'repeat-x', 'repeat-y', or 'no-repeat'. The default is 'no-repeat'
|
||||
*
|
||||
* @param {Array|Object} [config.fillLinearGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillLinearGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Array} [config.fillLinearGradientColorStops] array of color stops
|
||||
*
|
||||
* @param {Array|Object} [config.fillRadialGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillRadialGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillRadialGradientStartRadius]
|
||||
* @param {Number} [config.fillRadialGradientEndRadius]
|
||||
* @param {Array} [config.fillRadialGradientColorStops] array of color stops
|
||||
*
|
||||
* @param {String} [config.stroke] stroke color
|
||||
* @param {Number} [config.strokeWidth] stroke width
|
||||
* @param {String} [config.lineJoin] can be miter, round, or bevel. The default
|
||||
* is miter
|
||||
* @param {String} [config.lineCap] can be butt, round, or sqare. The default
|
||||
* is butt
|
||||
* @param {String} [config.shadowColor]
|
||||
* @param {Number} [config.shadowBlur]
|
||||
* @param {Obect} [config.shadowOffset]
|
||||
* @param {Number} [config.shadowOffset.x]
|
||||
* @param {Number} [config.shadowOffset.y]
|
||||
* @param {Number} [config.shadowOpacity] shadow opacity. Can be any real number
|
||||
* between 0 and 1
|
||||
* @param {Array} [config.dashArray]
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param {Number} [config.x]
|
||||
* @param {Number} [config.y]
|
||||
* @param {Number} [config.width]
|
||||
* @param {Number} [config.height]
|
||||
* @param {Boolean} [config.visible]
|
||||
* @param {Boolean} [config.listening] whether or not the node is listening for events
|
||||
* @param {String} [config.id] unique id
|
||||
* @param {String} [config.name] non-unique name
|
||||
* @param {Number} [config.opacity] determines node opacity. Can be any number between 0 and 1
|
||||
* @param {Object} [config.scale]
|
||||
* @param {Number} [config.scale.x]
|
||||
* @param {Number} [config.scale.y]
|
||||
* @param {Number} [config.rotation] rotation in radians
|
||||
* @param {Number} [config.rotationDeg] rotation in degrees
|
||||
* @param {Object} [config.offset] offset from center point and rotation point
|
||||
* @param {Number} [config.offset.x]
|
||||
* @param {Number} [config.offset.y]
|
||||
* @param {Boolean} [config.draggable]
|
||||
* @param {Function} [config.dragBoundFunc]
|
||||
* {{ShapeParams}}
|
||||
* {{NodeParams}}
|
||||
*/
|
||||
Kinetic.Text = function(config) {
|
||||
this._initText(config);
|
||||
|
@@ -9,64 +9,8 @@
|
||||
* @param {Number} [config.fontSize] default is 12
|
||||
* @param {String} [config.fontStyle] can be normal, bold, or italic. Default is normal
|
||||
* @param {String} config.text
|
||||
*
|
||||
*
|
||||
* @param {String} [config.fill] fill color
|
||||
*
|
||||
* @param {Image} [config.fillPatternImage] fill pattern image
|
||||
* @param {Number} [config.fillPatternX]
|
||||
* @param {Number} [config.fillPatternY]
|
||||
* @param {Array|Object} [config.fillPatternOffset] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillPatternScale] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillPatternRotation]
|
||||
* @param {String} [config.fillPatternRepeat] can be 'repeat', 'repeat-x', 'repeat-y', or 'no-repeat'. The default is 'no-repeat'
|
||||
*
|
||||
* @param {Array|Object} [config.fillLinearGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillLinearGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Array} [config.fillLinearGradientColorStops] array of color stops
|
||||
*
|
||||
* @param {Array|Object} [config.fillRadialGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillRadialGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillRadialGradientStartRadius]
|
||||
* @param {Number} [config.fillRadialGradientEndRadius]
|
||||
* @param {Array} [config.fillRadialGradientColorStops] array of color stops
|
||||
*
|
||||
* @param {String} [config.stroke] stroke color
|
||||
* @param {Number} [config.strokeWidth] stroke width
|
||||
* @param {String} [config.lineJoin] can be miter, round, or bevel. The default
|
||||
* is miter
|
||||
* @param {String} [config.lineCap] can be butt, round, or sqare. The default
|
||||
* is butt
|
||||
* @param {String} [config.shadowColor]
|
||||
* @param {Number} [config.shadowBlur]
|
||||
* @param {Obect} [config.shadowOffset]
|
||||
* @param {Number} [config.shadowOffset.x]
|
||||
* @param {Number} [config.shadowOffset.y]
|
||||
* @param {Number} [config.shadowOpacity] shadow opacity. Can be any real number
|
||||
* between 0 and 1
|
||||
* @param {Array} [config.dashArray]
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param {Number} [config.x]
|
||||
* @param {Number} [config.y]
|
||||
* @param {Number} [config.width]
|
||||
* @param {Number} [config.height]
|
||||
* @param {Boolean} [config.visible]
|
||||
* @param {Boolean} [config.listening] whether or not the node is listening for events
|
||||
* @param {String} [config.id] unique id
|
||||
* @param {String} [config.name] non-unique name
|
||||
* @param {Number} [config.opacity] determines node opacity. Can be any number between 0 and 1
|
||||
* @param {Object} [config.scale]
|
||||
* @param {Number} [config.scale.x]
|
||||
* @param {Number} [config.scale.y]
|
||||
* @param {Number} [config.rotation] rotation in radians
|
||||
* @param {Number} [config.rotationDeg] rotation in degrees
|
||||
* @param {Object} [config.offset] offset from center point and rotation point
|
||||
* @param {Number} [config.offset.x]
|
||||
* @param {Number} [config.offset.y]
|
||||
* @param {Boolean} [config.draggable]
|
||||
* @param {Function} [config.dragBoundFunc]
|
||||
* {{ShapeParams}}
|
||||
* {{NodeParams}}
|
||||
*/
|
||||
Kinetic.TextPath = function(config) {
|
||||
this._initTextPath(config);
|
||||
|
@@ -7,64 +7,8 @@
|
||||
* @param {Number} config.angle
|
||||
* @param {Number} config.radius
|
||||
* @param {Boolean} [config.clockwise]
|
||||
*
|
||||
* -------------------------------------------------
|
||||
* @param {String} [config.fill] fill color
|
||||
* -------------------------------------------------
|
||||
* @param {Image} [config.fillPatternImage] fill pattern image
|
||||
* @param {Number} [config.fillPatternX]
|
||||
* @param {Number} [config.fillPatternY]
|
||||
* @param {Array|Object} [config.fillPatternOffset] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillPatternScale] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillPatternRotation]
|
||||
* @param {String} [config.fillPatternRepeat] can be 'repeat', 'repeat-x', 'repeat-y', or 'no-repeat'. The default is 'no-repeat'
|
||||
* -------------------------------------------------
|
||||
* @param {Array|Object} [config.fillLinearGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillLinearGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Array} [config.fillLinearGradientColorStops] array of color stops
|
||||
* -------------------------------------------------
|
||||
* @param {Array|Object} [config.fillRadialGradientStartPoint] array with two elements or object with x and y component
|
||||
* @param {Array|Object} [config.fillRadialGradientEndPoint] array with two elements or object with x and y component
|
||||
* @param {Number} [config.fillRadialGradientStartRadius]
|
||||
* @param {Number} [config.fillRadialGradientEndRadius]
|
||||
* @param {Array} [config.fillRadialGradientColorStops] array of color stops
|
||||
* -------------------------------------------------
|
||||
* @param {String} [config.stroke] stroke color
|
||||
* @param {Number} [config.strokeWidth] stroke width
|
||||
* @param {String} [config.lineJoin] can be miter, round, or bevel. The default
|
||||
* is miter
|
||||
* @param {String} [config.lineCap] can be butt, round, or sqare. The default
|
||||
* is butt
|
||||
* @param {String} [config.shadowColor]
|
||||
* @param {Number} [config.shadowBlur]
|
||||
* @param {Obect} [config.shadowOffset]
|
||||
* @param {Number} [config.shadowOffset.x]
|
||||
* @param {Number} [config.shadowOffset.y]
|
||||
* @param {Number} [config.shadowOpacity] shadow opacity. Can be any real number
|
||||
* between 0 and 1
|
||||
* @param {Array} [config.dashArray]
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param {Number} [config.x]
|
||||
* @param {Number} [config.y]
|
||||
* @param {Number} [config.width]
|
||||
* @param {Number} [config.height]
|
||||
* @param {Boolean} [config.visible]
|
||||
* @param {Boolean} [config.listening] whether or not the node is listening for events
|
||||
* @param {String} [config.id] unique id
|
||||
* @param {String} [config.name] non-unique name
|
||||
* @param {Number} [config.opacity] determines node opacity. Can be any number between 0 and 1
|
||||
* @param {Object} [config.scale]
|
||||
* @param {Number} [config.scale.x]
|
||||
* @param {Number} [config.scale.y]
|
||||
* @param {Number} [config.rotation] rotation in radians
|
||||
* @param {Number} [config.rotationDeg] rotation in degrees
|
||||
* @param {Object} [config.offset] offset from center point and rotation point
|
||||
* @param {Number} [config.offset.x]
|
||||
* @param {Number} [config.offset.y]
|
||||
* @param {Boolean} [config.draggable]
|
||||
* @param {Function} [config.dragBoundFunc]
|
||||
* {{ShapeParams}}
|
||||
* {{NodeParams}}
|
||||
*/
|
||||
Kinetic.Wedge = function(config) {
|
||||
this._initWedge(config);
|
||||
|
Reference in New Issue
Block a user