Comparing version 3.4.4 to 3.5.0
@@ -56,3 +56,3 @@ /** | ||
else { | ||
var len2 = p0[0].length; | ||
var len2 = len && p0[0].length; | ||
for (var i = 0; i < len; i++) { | ||
@@ -221,2 +221,7 @@ for (var j = 0; j < len2; j++) { | ||
function getArrayDim(keyframes) { | ||
var lastValue = keyframes[keyframes.length - 1].value; | ||
return isArrayLike(lastValue && lastValue[0]) ? 2 : 1; | ||
} | ||
function createTrackClip (animator, easing, oneTrackDone, keyframes, propName) { | ||
@@ -238,7 +243,4 @@ var getter = animator._getter; | ||
// For vertices morphing | ||
var arrDim = ( | ||
isValueArray | ||
&& isArrayLike(firstVal[0]) | ||
) | ||
? 2 : 1; | ||
var arrDim = isValueArray ? getArrayDim(keyframes) : 0; | ||
var trackMaxTime; | ||
@@ -245,0 +247,0 @@ // Sort keyframe as ascending |
@@ -513,5 +513,8 @@ /** | ||
* @constructor | ||
* @param {Object} obj Only apply `ownProperty`. | ||
*/ | ||
function HashMap(obj) { | ||
obj && extend(this, obj); | ||
obj && each(obj, function (value, key) { | ||
this.set(key, value); | ||
}, this); | ||
} | ||
@@ -552,4 +555,4 @@ | ||
function createHashMap() { | ||
return new HashMap(); | ||
function createHashMap(obj) { | ||
return new HashMap(obj); | ||
} | ||
@@ -556,0 +559,0 @@ |
@@ -299,2 +299,4 @@ 'use strict'; | ||
// If clipped by ancestor. | ||
// FIXME: If clipPath has neither stroke nor fill, | ||
// el.clipPath.contain(x, y) will always return false. | ||
if (el.clipPath && !el.clipPath.contain(x, y)) { | ||
@@ -318,1 +320,2 @@ return false; | ||
module.exports = Handler; | ||
@@ -974,7 +974,37 @@ 'use strict'; | ||
var scope = {}; | ||
var zlevel; | ||
var self = this; | ||
function findAndDrawOtherLayer(smaller, larger) { | ||
var zlevelList = self._zlevelList; | ||
if (smaller == null) { | ||
smaller = -Infinity; | ||
} | ||
var intermediateLayer; | ||
for (var i = 0; i < zlevelList.length; i++) { | ||
var z = zlevelList[i]; | ||
var layer = self._layers[z]; | ||
if (!layer.__builtin__ && z > smaller && z < larger) { | ||
intermediateLayer = layer; | ||
break; | ||
} | ||
} | ||
if (intermediateLayer && intermediateLayer.renderToCanvas) { | ||
imageLayer.ctx.save(); | ||
intermediateLayer.renderToCanvas(imageLayer.ctx); | ||
imageLayer.ctx.restore(); | ||
} | ||
} | ||
for (var i = 0; i < displayList.length; i++) { | ||
var el = displayList[i]; | ||
if (el.zlevel !== zlevel) { | ||
findAndDrawOtherLayer(zlevel, el.zlevel); | ||
zlevel = el.zlevel; | ||
} | ||
this._doPaintEl(el, imageLayer, true, scope); | ||
} | ||
findAndDrawOtherLayer(zlevel, Infinity); | ||
return imageLayer.dom; | ||
@@ -981,0 +1011,0 @@ }, |
@@ -34,3 +34,3 @@ /*! | ||
*/ | ||
zrender.version = '3.4.4'; | ||
zrender.version = '3.5.0'; | ||
@@ -37,0 +37,0 @@ /** |
{ | ||
"name": "zrender", | ||
"version": "3.4.4", | ||
"version": "3.5.0", | ||
"description": "A lightweight canvas library.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -56,3 +56,3 @@ /** | ||
else { | ||
var len2 = p0[0].length; | ||
var len2 = len && p0[0].length; | ||
for (var i = 0; i < len; i++) { | ||
@@ -221,2 +221,7 @@ for (var j = 0; j < len2; j++) { | ||
function getArrayDim(keyframes) { | ||
var lastValue = keyframes[keyframes.length - 1].value; | ||
return isArrayLike(lastValue && lastValue[0]) ? 2 : 1; | ||
} | ||
function createTrackClip (animator, easing, oneTrackDone, keyframes, propName) { | ||
@@ -238,7 +243,4 @@ var getter = animator._getter; | ||
// For vertices morphing | ||
var arrDim = ( | ||
isValueArray | ||
&& isArrayLike(firstVal[0]) | ||
) | ||
? 2 : 1; | ||
var arrDim = isValueArray ? getArrayDim(keyframes) : 0; | ||
var trackMaxTime; | ||
@@ -245,0 +247,0 @@ // Sort keyframe as ascending |
@@ -513,5 +513,8 @@ /** | ||
* @constructor | ||
* @param {Object} obj Only apply `ownProperty`. | ||
*/ | ||
function HashMap(obj) { | ||
obj && extend(this, obj); | ||
obj && each(obj, function (value, key) { | ||
this.set(key, value); | ||
}, this); | ||
} | ||
@@ -552,4 +555,4 @@ | ||
function createHashMap() { | ||
return new HashMap(); | ||
function createHashMap(obj) { | ||
return new HashMap(obj); | ||
} | ||
@@ -556,0 +559,0 @@ |
@@ -300,2 +300,4 @@ /** | ||
// If clipped by ancestor. | ||
// FIXME: If clipPath has neither stroke nor fill, | ||
// el.clipPath.contain(x, y) will always return false. | ||
if (el.clipPath && !el.clipPath.contain(x, y)) { | ||
@@ -319,2 +321,2 @@ return false; | ||
return Handler; | ||
}); | ||
}); |
@@ -974,7 +974,37 @@ /** | ||
var scope = {}; | ||
var zlevel; | ||
var self = this; | ||
function findAndDrawOtherLayer(smaller, larger) { | ||
var zlevelList = self._zlevelList; | ||
if (smaller == null) { | ||
smaller = -Infinity; | ||
} | ||
var intermediateLayer; | ||
for (var i = 0; i < zlevelList.length; i++) { | ||
var z = zlevelList[i]; | ||
var layer = self._layers[z]; | ||
if (!layer.__builtin__ && z > smaller && z < larger) { | ||
intermediateLayer = layer; | ||
break; | ||
} | ||
} | ||
if (intermediateLayer && intermediateLayer.renderToCanvas) { | ||
imageLayer.ctx.save(); | ||
intermediateLayer.renderToCanvas(imageLayer.ctx); | ||
imageLayer.ctx.restore(); | ||
} | ||
} | ||
for (var i = 0; i < displayList.length; i++) { | ||
var el = displayList[i]; | ||
if (el.zlevel !== zlevel) { | ||
findAndDrawOtherLayer(zlevel, el.zlevel); | ||
zlevel = el.zlevel; | ||
} | ||
this._doPaintEl(el, imageLayer, true, scope); | ||
} | ||
findAndDrawOtherLayer(zlevel, Infinity); | ||
return imageLayer.dom; | ||
@@ -981,0 +1011,0 @@ }, |
@@ -34,3 +34,3 @@ /*! | ||
*/ | ||
zrender.version = '3.4.4'; | ||
zrender.version = '3.5.0'; | ||
@@ -37,0 +37,0 @@ /** |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1029603
29471