mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 20:48:28 +08:00
fix docs
This commit is contained in:
parent
a5b8c486ce
commit
46bb48e470
44
CHANGELOG.md
44
CHANGELOG.md
@ -2,25 +2,29 @@
|
|||||||
|
|
||||||
* Bug Fixes
|
* Bug Fixes
|
||||||
* working "this-example" as name for nodes
|
* working "this-example" as name for nodes
|
||||||
|
* Kinetic.Text() with no config throws exception
|
||||||
|
* Enhancements
|
||||||
|
* `black` is default fill for shapes
|
||||||
|
|
||||||
## 5.1.9 2014-01-09
|
## 5.1.9 2014-01-09
|
||||||
* Bug Fixes
|
|
||||||
* Correct stage resizing with `FastLayer`
|
* Bug Fixes
|
||||||
* `batchDraw` method for `FastLayer`
|
* Correct stage resizing with `FastLayer`
|
||||||
* Correct mouseover/mouseout/mouseenter/mouseleave events for groups
|
* `batchDraw` method for `FastLayer`
|
||||||
* cache node before adding to layer
|
* Correct mouseover/mouseout/mouseenter/mouseleave events for groups
|
||||||
* `intersects` function now works for shapes with shadow
|
* cache node before adding to layer
|
||||||
* Enhancements
|
* `intersects` function now works for shapes with shadow
|
||||||
* npm package. See https://github.com/ericdrowell/KineticJS#installation
|
* Enhancements
|
||||||
* much better dragging performance
|
* npm package. See https://github.com/ericdrowell/KineticJS#installation
|
||||||
* `browserify` support
|
* much better dragging performance
|
||||||
* applying opacity to cached node
|
* `browserify` support
|
||||||
* remove all events with `node.off()`
|
* applying opacity to cached node
|
||||||
* mouse dragging only with left button
|
* remove all events with `node.off()`
|
||||||
* opacity now affect cached shapes
|
* mouse dragging only with left button
|
||||||
* Label corner radius
|
* opacity now affect cached shapes
|
||||||
* smart changing `width`, `height`, `radius` attrs for circle, start, ellipse, ring.
|
* Label corner radius
|
||||||
* `mousewheel` support. Thanks [@vmichnowicz](https://github.com/vmichnowicz)
|
* smart changing `width`, `height`, `radius` attrs for circle, start, ellipse, ring.
|
||||||
* new Arrow plugin
|
* `mousewheel` support. Thanks [@vmichnowicz](https://github.com/vmichnowicz)
|
||||||
* multiple names: `node.name('foo bar'); container.find('.foo');` (thanks [@mattslocum](https://github.com/mattslocum))
|
* new Arrow plugin
|
||||||
* `Container.findOne()` method. (thanks [@pronebird](https://github.com/pronebird))
|
* multiple names: `node.name('foo bar'); container.find('.foo');` (thanks [@mattslocum](https://github.com/mattslocum))
|
||||||
|
* `Container.findOne()` method. (thanks [@pronebird](https://github.com/pronebird))
|
@ -223,7 +223,7 @@ module.exports = function(grunt) {
|
|||||||
},
|
},
|
||||||
jsdoc : {
|
jsdoc : {
|
||||||
dist : {
|
dist : {
|
||||||
src: ['README.md', './src/**/*.js'],
|
src: ['README.md', './dist/kinetic-v<%= pkg.version %>.js'],
|
||||||
options: {
|
options: {
|
||||||
destination: 'api',
|
destination: 'api',
|
||||||
template : './node_modules/grunt-jsdoc/node_modules/ink-docstrap/template',
|
template : './node_modules/grunt-jsdoc/node_modules/ink-docstrap/template',
|
||||||
@ -266,6 +266,7 @@ module.exports = function(grunt) {
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
grunt.registerTask('api', 'Generate docs for homepage', [
|
grunt.registerTask('api', 'Generate docs for homepage', [
|
||||||
|
'full',
|
||||||
'jsdoc'
|
'jsdoc'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
54
src/Node.js
54
src/Node.js
@ -348,17 +348,6 @@
|
|||||||
name: name,
|
name: name,
|
||||||
handler: handler
|
handler: handler
|
||||||
});
|
});
|
||||||
|
|
||||||
// NOTE: this flag is set to true when any event handler is added, even non
|
|
||||||
// mouse or touch gesture events. This improves performance for most
|
|
||||||
// cases where users aren't using events, but is still very light weight.
|
|
||||||
// To ensure perfect accuracy, devs can explicitly set listening to false.
|
|
||||||
/*
|
|
||||||
if (name !== KINETIC) {
|
|
||||||
this._listeningEnabled = true;
|
|
||||||
this._clearSelfAndAncestorCache(LISTENING_ENABLED);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
@ -1845,6 +1834,7 @@
|
|||||||
/**
|
/**
|
||||||
* get/set offset x
|
* get/set offset x
|
||||||
* @name offsetX
|
* @name offsetX
|
||||||
|
* @method
|
||||||
* @memberof Kinetic.Node.prototype
|
* @memberof Kinetic.Node.prototype
|
||||||
* @param {Number} x
|
* @param {Number} x
|
||||||
* @returns {Number}
|
* @returns {Number}
|
||||||
@ -1858,26 +1848,6 @@
|
|||||||
|
|
||||||
Kinetic.Factory.addGetterSetter(Kinetic.Node, 'offsetY', 0);
|
Kinetic.Factory.addGetterSetter(Kinetic.Node, 'offsetY', 0);
|
||||||
|
|
||||||
/**
|
|
||||||
* get/set drag distance
|
|
||||||
* @name dragDistance
|
|
||||||
* @memberof Kinetic.Node.prototype
|
|
||||||
* @param {Number} distance
|
|
||||||
* @returns {Number}
|
|
||||||
* @example
|
|
||||||
* // get drag distance
|
|
||||||
* var dragDistance = node.dragDistance();
|
|
||||||
*
|
|
||||||
* // set distance
|
|
||||||
* // node starts dragging only if pointer moved more then 3 pixels
|
|
||||||
* node.dragDistance(3);
|
|
||||||
* // or set globally
|
|
||||||
* Kinetic.dragDistance = 3;
|
|
||||||
*/
|
|
||||||
|
|
||||||
Kinetic.Factory.addSetter(Kinetic.Node, 'dragDistance');
|
|
||||||
Kinetic.Factory.addOverloadedGetterSetter(Kinetic.Node, 'dragDistance');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get/set offset y
|
* get/set offset y
|
||||||
* @name offsetY
|
* @name offsetY
|
||||||
@ -1893,6 +1863,28 @@
|
|||||||
* node.offsetY(3);
|
* node.offsetY(3);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Kinetic.Factory.addSetter(Kinetic.Node, 'dragDistance');
|
||||||
|
Kinetic.Factory.addOverloadedGetterSetter(Kinetic.Node, 'dragDistance');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get/set drag distance
|
||||||
|
* @name dragDistance
|
||||||
|
* @method
|
||||||
|
* @memberof Kinetic.Node.prototype
|
||||||
|
* @param {Number} distance
|
||||||
|
* @returns {Number}
|
||||||
|
* @example
|
||||||
|
* // get drag distance
|
||||||
|
* var dragDistance = node.dragDistance();
|
||||||
|
*
|
||||||
|
* // set distance
|
||||||
|
* // node starts dragging only if pointer moved more then 3 pixels
|
||||||
|
* node.dragDistance(3);
|
||||||
|
* // or set globally
|
||||||
|
* Kinetic.dragDistance = 3;
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
Kinetic.Factory.addSetter(Kinetic.Node, 'width', 0);
|
Kinetic.Factory.addSetter(Kinetic.Node, 'width', 0);
|
||||||
Kinetic.Factory.addOverloadedGetterSetter(Kinetic.Node, 'width');
|
Kinetic.Factory.addOverloadedGetterSetter(Kinetic.Node, 'width');
|
||||||
/**
|
/**
|
||||||
|
@ -730,6 +730,9 @@
|
|||||||
*
|
*
|
||||||
* // set fill color with rgba and make it 50% opaque
|
* // set fill color with rgba and make it 50% opaque
|
||||||
* shape.fill('rgba(0,255,0,0.5');
|
* shape.fill('rgba(0,255,0,0.5');
|
||||||
|
*
|
||||||
|
* // shape without fill
|
||||||
|
* shape.fill(null);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Kinetic.Factory.addGetterSetter(Kinetic.Shape, 'fillRed', 0, Kinetic.Validators.RGBComponent);
|
Kinetic.Factory.addGetterSetter(Kinetic.Shape, 'fillRed', 0, Kinetic.Validators.RGBComponent);
|
||||||
|
Loading…
Reference in New Issue
Block a user