Comparing version 3.0.4 to 3.0.5
@@ -106,3 +106,3 @@ 'use strict'; | ||
var t = curve.quadraticExtremum(y0, y1, y2); | ||
if (t >=0 && t <= 1) { | ||
if (t >= 0 && t <= 1) { | ||
var w = 0; | ||
@@ -112,3 +112,3 @@ var y_ = curve.quadraticAt(y0, y1, y2, t); | ||
var x_ = curve.quadraticAt(x0, x1, x2, roots[i]); | ||
if (x_ > x) { | ||
if (x_ < x) { // Quick reject | ||
continue; | ||
@@ -127,3 +127,3 @@ } | ||
var x_ = curve.quadraticAt(x0, x1, x2, roots[0]); | ||
if (x_ > x) { | ||
if (x_ < x) { // Quick reject | ||
return 0; | ||
@@ -130,0 +130,0 @@ } |
@@ -21,5 +21,5 @@ /** | ||
*/ | ||
var ZImage = function (opts) { | ||
function ZImage(opts) { | ||
Displayable.call(this, opts); | ||
}; | ||
} | ||
@@ -26,0 +26,0 @@ ZImage.prototype = { |
@@ -242,2 +242,3 @@ /** | ||
}, | ||
/** | ||
@@ -244,0 +245,0 @@ * @param {Object|string} key |
@@ -312,3 +312,2 @@ 'use strict'; | ||
} | ||
// TODO Use events ? | ||
el.beforeBrush && el.beforeBrush(ctx); | ||
@@ -315,0 +314,0 @@ el.brush(ctx, false); |
@@ -428,3 +428,3 @@ // http://www.w3.org/TR/NOTE-VML | ||
// Rewrite the original path method | ||
Path.prototype.brush = function (vmlRoot) { | ||
Path.prototype.brushVML = function (vmlRoot) { | ||
var style = this.style; | ||
@@ -479,3 +479,3 @@ | ||
Path.prototype.onRemoveFromStorage = function (vmlRoot) { | ||
Path.prototype.onRemove = function (vmlRoot) { | ||
remove(vmlRoot, this._vmlEl); | ||
@@ -485,3 +485,3 @@ this.removeRectText(vmlRoot); | ||
Path.prototype.onAddToStorage = function (vmlRoot) { | ||
Path.prototype.onAdd = function (vmlRoot) { | ||
append(vmlRoot, this._vmlEl); | ||
@@ -501,3 +501,3 @@ this.appendRectText(vmlRoot); | ||
// Rewrite the original path method | ||
ZImage.prototype.brush = function (vmlRoot) { | ||
ZImage.prototype.brushVML = function (vmlRoot) { | ||
var style = this.style; | ||
@@ -708,3 +708,3 @@ var image = style.image; | ||
ZImage.prototype.onRemoveFromStorage = function (vmlRoot) { | ||
ZImage.prototype.onRemove = function (vmlRoot) { | ||
remove(vmlRoot, this._vmlEl); | ||
@@ -719,3 +719,3 @@ | ||
ZImage.prototype.onAddToStorage = function (vmlRoot) { | ||
ZImage.prototype.onAdd = function (vmlRoot) { | ||
append(vmlRoot, this._vmlEl); | ||
@@ -1006,3 +1006,3 @@ this.appendRectText(vmlRoot); | ||
Text.prototype.brush = function (root) { | ||
Text.prototype.brushVML = function (root) { | ||
var style = this.style; | ||
@@ -1017,9 +1017,9 @@ if (style.text) { | ||
Text.prototype.onRemoveFromStorage = function (vmlRoot) { | ||
Text.prototype.onRemove = function (vmlRoot) { | ||
this.removeRectText(vmlRoot); | ||
}; | ||
Text.prototype.onAddToStorage = function (vmlRoot) { | ||
Text.prototype.onAdd = function (vmlRoot) { | ||
this.appendRectText(vmlRoot); | ||
}; | ||
} |
@@ -51,3 +51,3 @@ /** | ||
if (el) { | ||
el.onRemoveFromStorage && el.onRemoveFromStorage(vmlRoot); | ||
el.onRemove && el.onRemove(vmlRoot); | ||
} | ||
@@ -58,3 +58,3 @@ }; | ||
// Displayable already has a vml node | ||
el.onAddToStorage && el.onAddToStorage(vmlRoot); | ||
el.onAdd && el.onAdd(vmlRoot); | ||
@@ -94,3 +94,3 @@ oldAddToMap.call(storage, el); | ||
if (!el.__alreadyNotVisible) { | ||
el.onRemoveFromStorage(vmlRoot); | ||
el.onRemove(vmlRoot); | ||
} | ||
@@ -102,3 +102,3 @@ // Set as already invisible | ||
if (el.__alreadyNotVisible) { | ||
el.onAddToStorage(vmlRoot); | ||
el.onAdd(vmlRoot); | ||
} | ||
@@ -108,3 +108,3 @@ el.__alreadyNotVisible = false; | ||
el.beforeBrush && el.beforeBrush(); | ||
el.brush(vmlRoot); | ||
(el.brushVML || el.brush)(vmlRoot); | ||
el.afterBrush && el.afterBrush(); | ||
@@ -111,0 +111,0 @@ } |
@@ -31,3 +31,3 @@ /*! | ||
*/ | ||
zrender.version = '3.0.4'; | ||
zrender.version = '3.0.5'; | ||
@@ -34,0 +34,0 @@ /** |
{ | ||
"name": "zrender", | ||
"version": "3.0.4", | ||
"version": "3.0.5", | ||
"description": "A lightweight canvas library.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -107,3 +107,3 @@ define(function (require) { | ||
var t = curve.quadraticExtremum(y0, y1, y2); | ||
if (t >=0 && t <= 1) { | ||
if (t >= 0 && t <= 1) { | ||
var w = 0; | ||
@@ -113,3 +113,3 @@ var y_ = curve.quadraticAt(y0, y1, y2, t); | ||
var x_ = curve.quadraticAt(x0, x1, x2, roots[i]); | ||
if (x_ > x) { | ||
if (x_ < x) { // Quick reject | ||
continue; | ||
@@ -128,3 +128,3 @@ } | ||
var x_ = curve.quadraticAt(x0, x1, x2, roots[0]); | ||
if (x_ > x) { | ||
if (x_ < x) { // Quick reject | ||
return 0; | ||
@@ -131,0 +131,0 @@ } |
@@ -21,5 +21,5 @@ /** | ||
*/ | ||
var ZImage = function (opts) { | ||
function ZImage(opts) { | ||
Displayable.call(this, opts); | ||
}; | ||
} | ||
@@ -26,0 +26,0 @@ ZImage.prototype = { |
@@ -242,2 +242,3 @@ /** | ||
}, | ||
/** | ||
@@ -244,0 +245,0 @@ * @param {Object|string} key |
@@ -312,3 +312,2 @@ /** | ||
} | ||
// TODO Use events ? | ||
el.beforeBrush && el.beforeBrush(ctx); | ||
@@ -315,0 +314,0 @@ el.brush(ctx, false); |
@@ -428,3 +428,3 @@ // http://www.w3.org/TR/NOTE-VML | ||
// Rewrite the original path method | ||
Path.prototype.brush = function (vmlRoot) { | ||
Path.prototype.brushVML = function (vmlRoot) { | ||
var style = this.style; | ||
@@ -479,3 +479,3 @@ | ||
Path.prototype.onRemoveFromStorage = function (vmlRoot) { | ||
Path.prototype.onRemove = function (vmlRoot) { | ||
remove(vmlRoot, this._vmlEl); | ||
@@ -485,3 +485,3 @@ this.removeRectText(vmlRoot); | ||
Path.prototype.onAddToStorage = function (vmlRoot) { | ||
Path.prototype.onAdd = function (vmlRoot) { | ||
append(vmlRoot, this._vmlEl); | ||
@@ -501,3 +501,3 @@ this.appendRectText(vmlRoot); | ||
// Rewrite the original path method | ||
ZImage.prototype.brush = function (vmlRoot) { | ||
ZImage.prototype.brushVML = function (vmlRoot) { | ||
var style = this.style; | ||
@@ -708,3 +708,3 @@ var image = style.image; | ||
ZImage.prototype.onRemoveFromStorage = function (vmlRoot) { | ||
ZImage.prototype.onRemove = function (vmlRoot) { | ||
remove(vmlRoot, this._vmlEl); | ||
@@ -719,3 +719,3 @@ | ||
ZImage.prototype.onAddToStorage = function (vmlRoot) { | ||
ZImage.prototype.onAdd = function (vmlRoot) { | ||
append(vmlRoot, this._vmlEl); | ||
@@ -1006,3 +1006,3 @@ this.appendRectText(vmlRoot); | ||
Text.prototype.brush = function (root) { | ||
Text.prototype.brushVML = function (root) { | ||
var style = this.style; | ||
@@ -1017,7 +1017,7 @@ if (style.text) { | ||
Text.prototype.onRemoveFromStorage = function (vmlRoot) { | ||
Text.prototype.onRemove = function (vmlRoot) { | ||
this.removeRectText(vmlRoot); | ||
}; | ||
Text.prototype.onAddToStorage = function (vmlRoot) { | ||
Text.prototype.onAdd = function (vmlRoot) { | ||
this.appendRectText(vmlRoot); | ||
@@ -1024,0 +1024,0 @@ }; |
@@ -51,3 +51,3 @@ /** | ||
if (el) { | ||
el.onRemoveFromStorage && el.onRemoveFromStorage(vmlRoot); | ||
el.onRemove && el.onRemove(vmlRoot); | ||
} | ||
@@ -58,3 +58,3 @@ }; | ||
// Displayable already has a vml node | ||
el.onAddToStorage && el.onAddToStorage(vmlRoot); | ||
el.onAdd && el.onAdd(vmlRoot); | ||
@@ -94,3 +94,3 @@ oldAddToMap.call(storage, el); | ||
if (!el.__alreadyNotVisible) { | ||
el.onRemoveFromStorage(vmlRoot); | ||
el.onRemove(vmlRoot); | ||
} | ||
@@ -102,3 +102,3 @@ // Set as already invisible | ||
if (el.__alreadyNotVisible) { | ||
el.onAddToStorage(vmlRoot); | ||
el.onAdd(vmlRoot); | ||
} | ||
@@ -108,3 +108,3 @@ el.__alreadyNotVisible = false; | ||
el.beforeBrush && el.beforeBrush(); | ||
el.brush(vmlRoot); | ||
(el.brushVML || el.brush)(vmlRoot); | ||
el.afterBrush && el.afterBrush(); | ||
@@ -111,0 +111,0 @@ } |
@@ -31,3 +31,3 @@ /*! | ||
*/ | ||
zrender.version = '3.0.4'; | ||
zrender.version = '3.0.5'; | ||
@@ -34,0 +34,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
870496
170
25537