mirror of
https://github.com/konvajs/konva.git
synced 2025-09-22 20:14:01 +08:00
fix #1018
This commit is contained in:
20
kinetic.js
20
kinetic.js
@@ -4,7 +4,7 @@
|
||||
* http://www.kineticjs.com/
|
||||
* Copyright 2013, Eric Rowell
|
||||
* Licensed under the MIT or GPL Version 2 licenses.
|
||||
* Date: 2014-08-27
|
||||
* Date: 2014-09-23
|
||||
*
|
||||
* Copyright (C) 2011 - 2013 by Eric Rowell
|
||||
*
|
||||
@@ -6275,7 +6275,7 @@ var Kinetic = {};
|
||||
};
|
||||
|
||||
Kinetic.Animation._runFrames = function() {
|
||||
var layerHash,
|
||||
var layerHash = {},
|
||||
animations = this.animations,
|
||||
anim, layers, func, n, i, layersLen, layer, key, needRedraw;
|
||||
/*
|
||||
@@ -6289,36 +6289,36 @@ var Kinetic = {};
|
||||
* WARNING: don't cache animations.length because it could change while
|
||||
* the for loop is running, causing a JS error
|
||||
*/
|
||||
|
||||
for(n = 0; n < animations.length; n++) {
|
||||
layerHash = {};
|
||||
anim = animations[n];
|
||||
layers = anim.layers;
|
||||
func = anim.func;
|
||||
|
||||
|
||||
anim._updateFrameObject(now());
|
||||
layersLen = layers.length;
|
||||
|
||||
|
||||
|
||||
// if animation object has a function, execute it
|
||||
if (func) {
|
||||
// allow anim bypassing drawing
|
||||
needRedraw = (func.call(anim, anim.frame) !== false);
|
||||
} else {
|
||||
needRedraw = true;
|
||||
}
|
||||
|
||||
if (needRedraw) {
|
||||
for (i = 0; i < layersLen; i++) {
|
||||
layer = layers[i];
|
||||
|
||||
if (layer._id !== undefined) {
|
||||
layerHash[layer._id] = layer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (needRedraw) {
|
||||
for (key in layerHash) {
|
||||
layerHash[key].draw();
|
||||
}
|
||||
|
||||
for (key in layerHash) {
|
||||
layerHash[key].draw();
|
||||
}
|
||||
};
|
||||
Kinetic.Animation._animationLoop = function() {
|
||||
|
6
kinetic.min.js
vendored
6
kinetic.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -197,7 +197,7 @@
|
||||
};
|
||||
|
||||
Kinetic.Animation._runFrames = function() {
|
||||
var layerHash,
|
||||
var layerHash = {},
|
||||
animations = this.animations,
|
||||
anim, layers, func, n, i, layersLen, layer, key, needRedraw;
|
||||
/*
|
||||
@@ -211,36 +211,36 @@
|
||||
* WARNING: don't cache animations.length because it could change while
|
||||
* the for loop is running, causing a JS error
|
||||
*/
|
||||
|
||||
for(n = 0; n < animations.length; n++) {
|
||||
layerHash = {};
|
||||
anim = animations[n];
|
||||
layers = anim.layers;
|
||||
func = anim.func;
|
||||
|
||||
|
||||
anim._updateFrameObject(now());
|
||||
layersLen = layers.length;
|
||||
|
||||
|
||||
|
||||
// if animation object has a function, execute it
|
||||
if (func) {
|
||||
// allow anim bypassing drawing
|
||||
needRedraw = (func.call(anim, anim.frame) !== false);
|
||||
} else {
|
||||
needRedraw = true;
|
||||
}
|
||||
|
||||
if (needRedraw) {
|
||||
for (i = 0; i < layersLen; i++) {
|
||||
layer = layers[i];
|
||||
|
||||
if (layer._id !== undefined) {
|
||||
layerHash[layer._id] = layer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (needRedraw) {
|
||||
for (key in layerHash) {
|
||||
layerHash[key].draw();
|
||||
}
|
||||
|
||||
for (key in layerHash) {
|
||||
layerHash[key].draw();
|
||||
}
|
||||
};
|
||||
Kinetic.Animation._animationLoop = function() {
|
||||
|
Reference in New Issue
Block a user