mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 15:23:44 +08:00
some cleaning
This commit is contained in:
parent
ff983ea8c0
commit
e1051b2b00
@ -5,7 +5,10 @@ src
|
|||||||
docs
|
docs
|
||||||
test
|
test
|
||||||
.travis.yml
|
.travis.yml
|
||||||
|
.idea
|
||||||
Gruntfile.js
|
Gruntfile.js
|
||||||
|
resources
|
||||||
|
api
|
||||||
bower-template.json
|
bower-template.json
|
||||||
bower.json
|
bower.json
|
||||||
presentation-schedule.md
|
presentation-schedule.md
|
||||||
|
19
Gruntfile.js
19
Gruntfile.js
@ -199,16 +199,6 @@ module.exports = function(grunt) {
|
|||||||
dest: 'konva.js'
|
dest: 'konva.js'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
shell: {
|
|
||||||
jsdoc: {
|
|
||||||
options: {
|
|
||||||
stdout: true,
|
|
||||||
stderr : true,
|
|
||||||
failOnError : true
|
|
||||||
},
|
|
||||||
command: './node_modules/.bin/jsdoc ./dist/konva-v<%= pkg.version %>.js -d ./docs'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mocha_phantomjs: {
|
mocha_phantomjs: {
|
||||||
all: ['test/runner.html']
|
all: ['test/runner.html']
|
||||||
},
|
},
|
||||||
@ -223,9 +213,9 @@ module.exports = function(grunt) {
|
|||||||
},
|
},
|
||||||
jsdoc : {
|
jsdoc : {
|
||||||
dist : {
|
dist : {
|
||||||
src: ['README.md', './dist/konva-v<%= pkg.version %>.js'],
|
src: ['./dist/konva-v<%= pkg.version %>.js'],
|
||||||
options: {
|
options: {
|
||||||
destination: 'api',
|
destination: 'docs',
|
||||||
template : './node_modules/grunt-jsdoc/node_modules/ink-docstrap/template',
|
template : './node_modules/grunt-jsdoc/node_modules/ink-docstrap/template',
|
||||||
configure : './resources/jsdoc.conf.json'
|
configure : './resources/jsdoc.conf.json'
|
||||||
}
|
}
|
||||||
@ -261,11 +251,6 @@ module.exports = function(grunt) {
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
grunt.registerTask('docs', 'Generate docs', [
|
grunt.registerTask('docs', 'Generate docs', [
|
||||||
'full',
|
|
||||||
'shell:jsdoc'
|
|
||||||
]);
|
|
||||||
|
|
||||||
grunt.registerTask('api', 'Generate docs for homepage', [
|
|
||||||
'full',
|
'full',
|
||||||
'jsdoc'
|
'jsdoc'
|
||||||
]);
|
]);
|
||||||
|
26
konva.js
26
konva.js
@ -3,7 +3,7 @@
|
|||||||
* Konva JavaScript Framework v0.9.0
|
* Konva JavaScript Framework v0.9.0
|
||||||
* http://konvajs.github.io/
|
* http://konvajs.github.io/
|
||||||
* Licensed under the MIT or GPL Version 2 licenses.
|
* Licensed under the MIT or GPL Version 2 licenses.
|
||||||
* Date: 2015-02-17
|
* Date: 2015-02-26
|
||||||
*
|
*
|
||||||
* Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS)
|
* Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS)
|
||||||
* Modified work Copyright (C) 2014 - 2015 by Anton Lavrenov (Konva)
|
* Modified work Copyright (C) 2014 - 2015 by Anton Lavrenov (Konva)
|
||||||
@ -7021,6 +7021,30 @@ var Konva = {};
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tween node properties. Shorter usage of {@link Konva.Tween} object.
|
||||||
|
*
|
||||||
|
* @method Konva.Node#to
|
||||||
|
* @memberof Konva.Node
|
||||||
|
* @param {Object} [params] tween params
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* circle.to({
|
||||||
|
* x : 50,
|
||||||
|
* duration : 0.5
|
||||||
|
* });
|
||||||
|
*/
|
||||||
|
Konva.Node.prototype.to = function(params) {
|
||||||
|
var onFinish = params.onFinish;
|
||||||
|
params.node = this;
|
||||||
|
params.onFinish = function() {
|
||||||
|
tween.destroy();
|
||||||
|
onFinish();
|
||||||
|
};
|
||||||
|
var tween = new Konva.Tween(params);
|
||||||
|
tween.play();
|
||||||
|
};
|
||||||
|
|
||||||
var Tween = function(prop, propFunc, func, begin, finish, duration, yoyo) {
|
var Tween = function(prop, propFunc, func, begin, finish, duration, yoyo) {
|
||||||
this.prop = prop;
|
this.prop = prop;
|
||||||
this.propFunc = propFunc;
|
this.propFunc = propFunc;
|
||||||
|
6
konva.min.js
vendored
6
konva.min.js
vendored
File diff suppressed because one or more lines are too long
@ -19,11 +19,7 @@
|
|||||||
"linenums" : true,
|
"linenums" : true,
|
||||||
"collapseSymbols" : false,
|
"collapseSymbols" : false,
|
||||||
"inverseNav" : true,
|
"inverseNav" : true,
|
||||||
"highlightTutorialCode" : true,
|
"highlightTutorialCode" : true
|
||||||
"analytics" : {
|
|
||||||
"ua" : "UA-54202824-2",
|
|
||||||
"domain" : "http://konvajs.github.io"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"markdown" : {
|
"markdown" : {
|
||||||
"parser" : "gfm",
|
"parser" : "gfm",
|
||||||
|
Loading…
Reference in New Issue
Block a user