mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
cleaning docs
This commit is contained in:
23
kinetic.js
23
kinetic.js
@@ -361,7 +361,7 @@ var Kinetic = {};
|
|||||||
* to contain groups or shapes.
|
* to contain groups or shapes.
|
||||||
* @constructor
|
* @constructor
|
||||||
* @memberof Kinetic
|
* @memberof Kinetic
|
||||||
* @augments Kinetic.Container
|
* @augments Kinetic.BaseLayer
|
||||||
* @param {Object} config
|
* @param {Object} config
|
||||||
* @param {Boolean} [config.clearBeforeDraw] set this property to false if you don't want
|
* @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.
|
* to clear the canvas before each layer draw. The default value is true.
|
||||||
@@ -405,7 +405,7 @@ var Kinetic = {};
|
|||||||
* It renders about 2x faster than normal layers.
|
* It renders about 2x faster than normal layers.
|
||||||
* @constructor
|
* @constructor
|
||||||
* @memberof Kinetic
|
* @memberof Kinetic
|
||||||
* @augments Kinetic.Container
|
* @augments Kinetic.BaseLayer
|
||||||
* @param {Object} config
|
* @param {Object} config
|
||||||
* @param {Boolean} [config.clearBeforeDraw] set this property to false if you don't want
|
* @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.
|
* to clear the canvas before each layer draw. The default value is true.
|
||||||
@@ -3646,21 +3646,9 @@ var Kinetic = {};
|
|||||||
height: this.getHeight()
|
height: this.getHeight()
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
/**
|
|
||||||
* get width
|
|
||||||
* @method
|
|
||||||
* @memberof Kinetic.Node.prototype
|
|
||||||
* @returns {Integer}
|
|
||||||
*/
|
|
||||||
getWidth: function() {
|
getWidth: function() {
|
||||||
return this.attrs.width || 0;
|
return this.attrs.width || 0;
|
||||||
},
|
},
|
||||||
/**
|
|
||||||
* get height
|
|
||||||
* @method
|
|
||||||
* @memberof Kinetic.Node.prototype
|
|
||||||
* @returns {Integer}
|
|
||||||
*/
|
|
||||||
getHeight: function() {
|
getHeight: function() {
|
||||||
return this.attrs.height || 0;
|
return this.attrs.height || 0;
|
||||||
},
|
},
|
||||||
@@ -3721,13 +3709,6 @@ var Kinetic = {};
|
|||||||
newVal: newVal
|
newVal: newVal
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/**
|
|
||||||
* set id
|
|
||||||
* @method
|
|
||||||
* @memberof Kinetic.Node.prototype
|
|
||||||
* @param {String} id
|
|
||||||
* @returns {Kinetic.Node}
|
|
||||||
*/
|
|
||||||
setId: function(id) {
|
setId: function(id) {
|
||||||
var oldId = this.getId();
|
var oldId = this.getId();
|
||||||
|
|
||||||
|
@@ -197,7 +197,7 @@ var Kinetic = {};
|
|||||||
* to contain groups or shapes.
|
* to contain groups or shapes.
|
||||||
* @constructor
|
* @constructor
|
||||||
* @memberof Kinetic
|
* @memberof Kinetic
|
||||||
* @augments Kinetic.Container
|
* @augments Kinetic.BaseLayer
|
||||||
* @param {Object} config
|
* @param {Object} config
|
||||||
* @param {Boolean} [config.clearBeforeDraw] set this property to false if you don't want
|
* @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.
|
* to clear the canvas before each layer draw. The default value is true.
|
||||||
@@ -217,7 +217,7 @@ var Kinetic = {};
|
|||||||
* It renders about 2x faster than normal layers.
|
* It renders about 2x faster than normal layers.
|
||||||
* @constructor
|
* @constructor
|
||||||
* @memberof Kinetic
|
* @memberof Kinetic
|
||||||
* @augments Kinetic.Container
|
* @augments Kinetic.BaseLayer
|
||||||
* @param {Object} config
|
* @param {Object} config
|
||||||
* @param {Boolean} [config.clearBeforeDraw] set this property to false if you don't want
|
* @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.
|
* to clear the canvas before each layer draw. The default value is true.
|
||||||
|
19
src/Node.js
19
src/Node.js
@@ -1361,21 +1361,9 @@
|
|||||||
height: this.getHeight()
|
height: this.getHeight()
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
/**
|
|
||||||
* get width
|
|
||||||
* @method
|
|
||||||
* @memberof Kinetic.Node.prototype
|
|
||||||
* @returns {Integer}
|
|
||||||
*/
|
|
||||||
getWidth: function() {
|
getWidth: function() {
|
||||||
return this.attrs.width || 0;
|
return this.attrs.width || 0;
|
||||||
},
|
},
|
||||||
/**
|
|
||||||
* get height
|
|
||||||
* @method
|
|
||||||
* @memberof Kinetic.Node.prototype
|
|
||||||
* @returns {Integer}
|
|
||||||
*/
|
|
||||||
getHeight: function() {
|
getHeight: function() {
|
||||||
return this.attrs.height || 0;
|
return this.attrs.height || 0;
|
||||||
},
|
},
|
||||||
@@ -1436,13 +1424,6 @@
|
|||||||
newVal: newVal
|
newVal: newVal
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/**
|
|
||||||
* set id
|
|
||||||
* @method
|
|
||||||
* @memberof Kinetic.Node.prototype
|
|
||||||
* @param {String} id
|
|
||||||
* @returns {Kinetic.Node}
|
|
||||||
*/
|
|
||||||
setId: function(id) {
|
setId: function(id) {
|
||||||
var oldId = this.getId();
|
var oldId = this.getId();
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
suite('BaseLayer', function() {
|
suite('BaseLayer', function() {
|
||||||
|
|
||||||
// ======================================================
|
// ======================================================
|
||||||
test.only('width and height', function() {
|
test('width and height', function() {
|
||||||
var stage = addStage();
|
var stage = addStage();
|
||||||
|
|
||||||
var layer = new Kinetic.FastLayer();
|
var layer = new Kinetic.FastLayer();
|
||||||
|
Reference in New Issue
Block a user