Comparing version 4.0.0 to 4.0.1
@@ -445,2 +445,7 @@ var _config = require("./config"); | ||
if (scope.prevElClipPaths) { | ||
// Needs restore the state. If last drawn element is in the clipping area. | ||
ctx.restore(); | ||
} | ||
ctx.restore(); | ||
@@ -473,7 +478,7 @@ } | ||
if (scope.prevClipLayer !== currentLayer || isClipPathChanged(clipPaths, scope.prevElClipPaths)) { | ||
if (!scope.prevElClipPaths || isClipPathChanged(clipPaths, scope.prevElClipPaths)) { | ||
// If has previous clipping state, restore from it | ||
if (scope.prevElClipPaths) { | ||
scope.prevClipLayer.ctx.restore(); | ||
scope.prevClipLayer = scope.prevElClipPaths = null; // Reset prevEl since context has been restored | ||
currentLayer.ctx.restore(); | ||
scope.prevElClipPaths = null; // Reset prevEl since context has been restored | ||
@@ -487,3 +492,2 @@ scope.prevEl = null; | ||
doClip(clipPaths, ctx); | ||
scope.prevClipLayer = currentLayer; | ||
scope.prevElClipPaths = clipPaths; | ||
@@ -490,0 +494,0 @@ } |
@@ -36,3 +36,3 @@ var guid = require("./core/guid"); | ||
var version = '4.0.0'; | ||
var version = '4.0.1'; | ||
/** | ||
@@ -39,0 +39,0 @@ * Initializing a zrender instance |
{ | ||
"name": "zrender", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "A lightweight canvas library.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -455,2 +455,7 @@ import {devicePixelRatio} from './config'; | ||
if (scope.prevElClipPaths) { | ||
// Needs restore the state. If last drawn element is in the clipping area. | ||
ctx.restore(); | ||
} | ||
ctx.restore(); | ||
@@ -491,3 +496,3 @@ } | ||
// Optimize when clipping on group with several elements | ||
if (scope.prevClipLayer !== currentLayer | ||
if (!scope.prevElClipPaths | ||
|| isClipPathChanged(clipPaths, scope.prevElClipPaths) | ||
@@ -497,4 +502,4 @@ ) { | ||
if (scope.prevElClipPaths) { | ||
scope.prevClipLayer.ctx.restore(); | ||
scope.prevClipLayer = scope.prevElClipPaths = null; | ||
currentLayer.ctx.restore(); | ||
scope.prevElClipPaths = null; | ||
@@ -508,3 +513,2 @@ // Reset prevEl since context has been restored | ||
doClip(clipPaths, ctx); | ||
scope.prevClipLayer = currentLayer; | ||
scope.prevElClipPaths = clipPaths; | ||
@@ -511,0 +515,0 @@ } |
@@ -346,3 +346,2 @@ import Path from '../graphic/Path'; | ||
transformPath(pathProxy, m); | ||
this.dirty(true); | ||
@@ -349,0 +348,0 @@ }; |
@@ -31,3 +31,3 @@ /*! | ||
*/ | ||
export var version = '4.0.0'; | ||
export var version = '4.0.1'; | ||
@@ -34,0 +34,0 @@ /** |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
3065655
61649