mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 20:48:28 +08:00
Warning when node for Tween
is not in layer yet. close #108
This commit is contained in:
parent
e731d0ccfe
commit
0e8c99b6c2
@ -9,6 +9,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- node@5.10.1, canvas@1.3.14, jsdom@8.5.0 support
|
||||
- `Konva.Path` will be filled when it is not closed
|
||||
- `Animation.start()` will not not immediate sync draw. This should improve performance a little.
|
||||
- Warning when node for `Tween` is not in layer yet.
|
||||
|
||||
## [0.12.4][2016-04-19]
|
||||
|
||||
|
8
konva.js
8
konva.js
@ -10559,9 +10559,15 @@
|
||||
this.node = node;
|
||||
this._id = idCounter++;
|
||||
|
||||
var layers = node.getLayer() || ((node instanceof Konva.Stage) ? node.getLayers() : null);
|
||||
if (!layers) {
|
||||
Konva.Util.console.error(
|
||||
'Tween constructor have `node` that is not in a layer. Please add node into layer first.'
|
||||
);
|
||||
}
|
||||
this.anim = new Konva.Animation(function() {
|
||||
that.tween.onEnterFrame();
|
||||
}, node.getLayer() || ((node instanceof Konva.Stage) ? node.getLayers() : null));
|
||||
}, layers);
|
||||
|
||||
this.tween = new Tween(key, function(i) {
|
||||
that._tweenFunc(i);
|
||||
|
4
konva.min.js
vendored
4
konva.min.js
vendored
File diff suppressed because one or more lines are too long
@ -172,9 +172,15 @@
|
||||
this.node = node;
|
||||
this._id = idCounter++;
|
||||
|
||||
var layers = node.getLayer() || ((node instanceof Konva.Stage) ? node.getLayers() : null);
|
||||
if (!layers) {
|
||||
Konva.Util.console.error(
|
||||
'Tween constructor have `node` that is not in a layer. Please add node into layer first.'
|
||||
);
|
||||
}
|
||||
this.anim = new Konva.Animation(function() {
|
||||
that.tween.onEnterFrame();
|
||||
}, node.getLayer() || ((node instanceof Konva.Stage) ? node.getLayers() : null));
|
||||
}, layers);
|
||||
|
||||
this.tween = new Tween(key, function(i) {
|
||||
that._tweenFunc(i);
|
||||
|
Loading…
Reference in New Issue
Block a user