mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-14 08:43:12 +00:00
v1711 (#3878)
This commit is contained in:
parent
bd2dda467f
commit
7f39959bf0
7 changed files with 86 additions and 9 deletions
|
|
@ -1,3 +1,7 @@
|
|||
**Version 1.7.11**
|
||||
|
||||
- Hotfix: restore path-groups ability to render [#3877](https://github.com/kangax/fabric.js/pull/3877)
|
||||
|
||||
**Version 1.7.10**
|
||||
|
||||
- Fix: correct svg export for radial gradients [#3807](https://github.com/kangax/fabric.js/pull/3807)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */
|
||||
|
||||
var fabric = fabric || { version: "1.7.10" };
|
||||
var fabric = fabric || { version: "1.7.11" };
|
||||
if (typeof exports !== 'undefined') {
|
||||
exports.fabric = fabric;
|
||||
}
|
||||
|
|
|
|||
48
dist/fabric.js
vendored
48
dist/fabric.js
vendored
|
|
@ -1,7 +1,7 @@
|
|||
/* build: `node build.js modules=ALL exclude=json,gestures minifier=uglifyjs` */
|
||||
/*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */
|
||||
|
||||
var fabric = fabric || { version: "1.7.10" };
|
||||
var fabric = fabric || { version: "1.7.11" };
|
||||
if (typeof exports !== 'undefined') {
|
||||
exports.fabric = fabric;
|
||||
}
|
||||
|
|
@ -17895,6 +17895,52 @@ fabric.util.object.extend(fabric.Object.prototype, /** @lends fabric.Object.prot
|
|||
ctx.restore();
|
||||
},
|
||||
|
||||
/**
|
||||
* Decide if the object should cache or not.
|
||||
* objectCaching is a global flag, wins over everything
|
||||
* needsItsOwnCache should be used when the object drawing method requires
|
||||
* a cache step. None of the fabric classes requires it.
|
||||
* Generally you do not cache objects in groups because the group outside is cached.
|
||||
* @return {Boolean}
|
||||
*/
|
||||
shouldCache: function() {
|
||||
var parentCache = this.objectCaching && (!this.group || this.needsItsOwnCache || !this.group.isCaching());
|
||||
this.caching = parentCache;
|
||||
if (parentCache) {
|
||||
for (var i = 0, len = this.paths.length; i < len; i++) {
|
||||
if (this.paths[i].willDrawShadow()) {
|
||||
this.caching = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return parentCache;
|
||||
},
|
||||
|
||||
/**
|
||||
* Check if this object or a child object will cast a shadow
|
||||
* @return {Boolean}
|
||||
*/
|
||||
willDrawShadow: function() {
|
||||
if (this.shadow) {
|
||||
return true;
|
||||
}
|
||||
for (var i = 0, len = this.paths.length; i < len; i++) {
|
||||
if (this.paths[i].willDrawShadow()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* Check if this group or its parent group are caching, recursively up
|
||||
* @return {Boolean}
|
||||
*/
|
||||
isCaching: function() {
|
||||
return this.caching || this.group && this.group.isCaching();
|
||||
},
|
||||
|
||||
/**
|
||||
* Check if cache is dirty
|
||||
*/
|
||||
|
|
|
|||
10
dist/fabric.min.js
vendored
10
dist/fabric.min.js
vendored
File diff suppressed because one or more lines are too long
BIN
dist/fabric.min.js.gz
vendored
BIN
dist/fabric.min.js.gz
vendored
Binary file not shown.
29
dist/fabric.require.js
vendored
29
dist/fabric.require.js
vendored
|
|
@ -1,5 +1,5 @@
|
|||
var fabric = fabric || {
|
||||
version: "1.7.10"
|
||||
version: "1.7.11"
|
||||
};
|
||||
|
||||
if (typeof exports !== "undefined") {
|
||||
|
|
@ -8615,6 +8615,33 @@ fabric.util.object.extend(fabric.Object.prototype, {
|
|||
}
|
||||
ctx.restore();
|
||||
},
|
||||
shouldCache: function() {
|
||||
var parentCache = this.objectCaching && (!this.group || this.needsItsOwnCache || !this.group.isCaching());
|
||||
this.caching = parentCache;
|
||||
if (parentCache) {
|
||||
for (var i = 0, len = this.paths.length; i < len; i++) {
|
||||
if (this.paths[i].willDrawShadow()) {
|
||||
this.caching = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return parentCache;
|
||||
},
|
||||
willDrawShadow: function() {
|
||||
if (this.shadow) {
|
||||
return true;
|
||||
}
|
||||
for (var i = 0, len = this.paths.length; i < len; i++) {
|
||||
if (this.paths[i].willDrawShadow()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
isCaching: function() {
|
||||
return this.caching || this.group && this.group.isCaching();
|
||||
},
|
||||
isCacheDirty: function() {
|
||||
if (this.callSuper("isCacheDirty")) {
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"name": "fabric",
|
||||
"description": "Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.",
|
||||
"homepage": "http://fabricjs.com/",
|
||||
"version": "1.7.10",
|
||||
"version": "1.7.11",
|
||||
"author": "Juriy Zaytsev <kangax@gmail.com>",
|
||||
"contributors": [
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue