Skip to content

Commit

Permalink
Dump 3.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
pissang committed Mar 21, 2016
1 parent 841d748 commit 14e98f4
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 43 deletions.
42 changes: 21 additions & 21 deletions build/zrender.js
Original file line number Diff line number Diff line change
Expand Up @@ -6829,9 +6829,9 @@ define('zrender/graphic/Image',['require','./Displayable','../core/BoundingRect'
* @constructor
* @param {Object} opts
*/
var ZImage = function (opts) {
function ZImage(opts) {
Displayable.call(this, opts);
};
}

ZImage.prototype = {

Expand Down Expand Up @@ -7284,7 +7284,6 @@ define('zrender/graphic/Image',['require','./Displayable','../core/BoundingRect'
}
prevElClipPaths = clipPaths;
}
// TODO Use events ?
el.beforeBrush && el.beforeBrush(ctx);
el.brush(ctx, false);
el.afterBrush && el.afterBrush(ctx);
Expand Down Expand Up @@ -7736,7 +7735,7 @@ define('zrender/zrender',['require','./core/guid','./core/env','./Handler','./St
/**
* @type {string}
*/
zrender.version = '3.0.4';
zrender.version = '3.0.5';

/**
* @param {HTMLElement} dom
Expand Down Expand Up @@ -9950,12 +9949,12 @@ define('zrender/contain/path',['require','../core/PathProxy','./line','./cubic',
}
else {
var t = curve.quadraticExtremum(y0, y1, y2);
if (t >=0 && t <= 1) {
if (t >= 0 && t <= 1) {
var w = 0;
var y_ = curve.quadraticAt(y0, y1, y2, t);
for (var i = 0; i < nRoots; i++) {
var x_ = curve.quadraticAt(x0, x1, x2, roots[i]);
if (x_ > x) {
if (x_ < x) { // Quick reject
continue;
}
if (roots[i] < t) {
Expand All @@ -9969,7 +9968,7 @@ define('zrender/contain/path',['require','../core/PathProxy','./line','./cubic',
}
else {
var x_ = curve.quadraticAt(x0, x1, x2, roots[0]);
if (x_ > x) {
if (x_ < x) { // Quick reject
return 0;
}
return y2 < y0 ? 1 : -1;
Expand Down Expand Up @@ -10476,6 +10475,7 @@ define('zrender/graphic/Path',['require','./Displayable','../core/util','../core
Displayable.prototype.attrKV.call(this, key, value);
}
},

/**
* @param {Object|string} key
* @param {*} value
Expand Down Expand Up @@ -12016,7 +12016,7 @@ if (!require('../core/env').canvasSupported) {
};

// Rewrite the original path method
Path.prototype.brush = function (vmlRoot) {
Path.prototype.brushVML = function (vmlRoot) {
var style = this.style;

var vmlEl = this._vmlEl;
Expand Down Expand Up @@ -12066,12 +12066,12 @@ if (!require('../core/env').canvasSupported) {
}
};

Path.prototype.onRemoveFromStorage = function (vmlRoot) {
Path.prototype.onRemove = function (vmlRoot) {
remove(vmlRoot, this._vmlEl);
this.removeRectText(vmlRoot);
};

Path.prototype.onAddToStorage = function (vmlRoot) {
Path.prototype.onAdd = function (vmlRoot) {
append(vmlRoot, this._vmlEl);
this.appendRectText(vmlRoot);
};
Expand All @@ -12086,7 +12086,7 @@ if (!require('../core/env').canvasSupported) {
};

// Rewrite the original path method
ZImage.prototype.brush = function (vmlRoot) {
ZImage.prototype.brushVML = function (vmlRoot) {
var style = this.style;
var image = style.image;

Expand Down Expand Up @@ -12292,7 +12292,7 @@ if (!require('../core/env').canvasSupported) {
}
};

ZImage.prototype.onRemoveFromStorage = function (vmlRoot) {
ZImage.prototype.onRemove = function (vmlRoot) {
remove(vmlRoot, this._vmlEl);

this._vmlEl = null;
Expand All @@ -12302,7 +12302,7 @@ if (!require('../core/env').canvasSupported) {
this.removeRectText(vmlRoot);
};

ZImage.prototype.onAddToStorage = function (vmlRoot) {
ZImage.prototype.onAdd = function (vmlRoot) {
append(vmlRoot, this._vmlEl);
this.appendRectText(vmlRoot);
};
Expand Down Expand Up @@ -12588,7 +12588,7 @@ if (!require('../core/env').canvasSupported) {
proto.appendRectText = appendRectText;
}

Text.prototype.brush = function (root) {
Text.prototype.brushVML = function (root) {
var style = this.style;
if (style.text) {
this.drawRectText(root, {
Expand All @@ -12598,11 +12598,11 @@ if (!require('../core/env').canvasSupported) {
}
};

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);
};
}
Expand Down Expand Up @@ -12657,13 +12657,13 @@ define('zrender/vml/Painter',['require','../core/log','./core'],function (requir
oldDelFromMap.call(storage, elId);

if (el) {
el.onRemoveFromStorage && el.onRemoveFromStorage(vmlRoot);
el.onRemove && el.onRemove(vmlRoot);
}
};

storage.addToMap = function (el) {
// Displayable already has a vml node
el.onAddToStorage && el.onAddToStorage(vmlRoot);
el.onAdd && el.onAdd(vmlRoot);

oldAddToMap.call(storage, el);
};
Expand Down Expand Up @@ -12698,19 +12698,19 @@ define('zrender/vml/Painter',['require','../core/log','./core'],function (requir
var el = list[i];
if (el.invisible || el.ignore) {
if (!el.__alreadyNotVisible) {
el.onRemoveFromStorage(vmlRoot);
el.onRemove(vmlRoot);
}
// Set as already invisible
el.__alreadyNotVisible = true;
}
else {
if (el.__alreadyNotVisible) {
el.onAddToStorage(vmlRoot);
el.onAdd(vmlRoot);
}
el.__alreadyNotVisible = false;
if (el.__dirty) {
el.beforeBrush && el.beforeBrush();
el.brush(vmlRoot);
(el.brushVML || el.brush)(vmlRoot);
el.afterBrush && el.afterBrush();
}
}
Expand Down
8 changes: 4 additions & 4 deletions build/zrender.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zrender",
"version": "3.0.4",
"version": "3.0.5",
"description": "A lightweight canvas library.",
"keywords": [
"canvas",
Expand Down
4 changes: 2 additions & 2 deletions src/graphic/Image.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ define(function (require) {
* @constructor
* @param {Object} opts
*/
var ZImage = function (opts) {
function ZImage(opts) {
Displayable.call(this, opts);
};
}

ZImage.prototype = {

Expand Down
1 change: 1 addition & 0 deletions src/graphic/Path.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ define(function (require) {
Displayable.prototype.attrKV.call(this, key, value);
}
},

/**
* @param {Object|string} key
* @param {*} value
Expand Down
10 changes: 5 additions & 5 deletions src/vml/Painter.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ define(function (require) {
oldDelFromMap.call(storage, elId);

if (el) {
el.onRemoveFromStorage && el.onRemoveFromStorage(vmlRoot);
el.onRemove && el.onRemove(vmlRoot);
}
};

storage.addToMap = function (el) {
// Displayable already has a vml node
el.onAddToStorage && el.onAddToStorage(vmlRoot);
el.onAdd && el.onAdd(vmlRoot);

oldAddToMap.call(storage, el);
};
Expand Down Expand Up @@ -89,19 +89,19 @@ define(function (require) {
var el = list[i];
if (el.invisible || el.ignore) {
if (!el.__alreadyNotVisible) {
el.onRemoveFromStorage(vmlRoot);
el.onRemove(vmlRoot);
}
// Set as already invisible
el.__alreadyNotVisible = true;
}
else {
if (el.__alreadyNotVisible) {
el.onAddToStorage(vmlRoot);
el.onAdd(vmlRoot);
}
el.__alreadyNotVisible = false;
if (el.__dirty) {
el.beforeBrush && el.beforeBrush();
el.brush(vmlRoot);
(el.brushVML || el.brush)(vmlRoot);
el.afterBrush && el.afterBrush();
}
}
Expand Down
18 changes: 9 additions & 9 deletions src/vml/graphic.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ if (!require('../core/env').canvasSupported) {
};

// Rewrite the original path method
Path.prototype.brush = function (vmlRoot) {
Path.prototype.brushVML = function (vmlRoot) {
var style = this.style;

var vmlEl = this._vmlEl;
Expand Down Expand Up @@ -475,12 +475,12 @@ if (!require('../core/env').canvasSupported) {
}
};

Path.prototype.onRemoveFromStorage = function (vmlRoot) {
Path.prototype.onRemove = function (vmlRoot) {
remove(vmlRoot, this._vmlEl);
this.removeRectText(vmlRoot);
};

Path.prototype.onAddToStorage = function (vmlRoot) {
Path.prototype.onAdd = function (vmlRoot) {
append(vmlRoot, this._vmlEl);
this.appendRectText(vmlRoot);
};
Expand All @@ -495,7 +495,7 @@ if (!require('../core/env').canvasSupported) {
};

// Rewrite the original path method
ZImage.prototype.brush = function (vmlRoot) {
ZImage.prototype.brushVML = function (vmlRoot) {
var style = this.style;
var image = style.image;

Expand Down Expand Up @@ -701,7 +701,7 @@ if (!require('../core/env').canvasSupported) {
}
};

ZImage.prototype.onRemoveFromStorage = function (vmlRoot) {
ZImage.prototype.onRemove = function (vmlRoot) {
remove(vmlRoot, this._vmlEl);

this._vmlEl = null;
Expand All @@ -711,7 +711,7 @@ if (!require('../core/env').canvasSupported) {
this.removeRectText(vmlRoot);
};

ZImage.prototype.onAddToStorage = function (vmlRoot) {
ZImage.prototype.onAdd = function (vmlRoot) {
append(vmlRoot, this._vmlEl);
this.appendRectText(vmlRoot);
};
Expand Down Expand Up @@ -997,7 +997,7 @@ if (!require('../core/env').canvasSupported) {
proto.appendRectText = appendRectText;
}

Text.prototype.brush = function (root) {
Text.prototype.brushVML = function (root) {
var style = this.style;
if (style.text) {
this.drawRectText(root, {
Expand All @@ -1007,11 +1007,11 @@ if (!require('../core/env').canvasSupported) {
}
};

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);
};
}
Expand Down
2 changes: 1 addition & 1 deletion src/zrender.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ define(function(require) {
/**
* @type {string}
*/
zrender.version = '3.0.4';
zrender.version = '3.0.5';

/**
* @param {HTMLElement} dom
Expand Down

0 comments on commit 14e98f4

Please sign in to comment.