mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-04-12 18:31:00 +00:00
Do not use uniqueID in IE as it's not always unique. Fix #311.
This commit is contained in:
parent
e3700484ea
commit
01982a446c
4 changed files with 7 additions and 17 deletions
9
dist/all.js
vendored
9
dist/all.js
vendored
|
|
@ -3,11 +3,11 @@
|
|||
|
||||
var fabric = fabric || { version: "0.9.21" };
|
||||
|
||||
if (typeof exports != 'undefined') {
|
||||
if (typeof exports !== 'undefined') {
|
||||
exports.fabric = fabric;
|
||||
}
|
||||
|
||||
if (typeof document != 'undefined' && typeof window != 'undefined') {
|
||||
if (typeof document !== 'undefined' && typeof window !== 'undefined') {
|
||||
fabric.document = document;
|
||||
fabric.window = window;
|
||||
}
|
||||
|
|
@ -2478,11 +2478,6 @@ fabric.util.string = {
|
|||
return true;
|
||||
}
|
||||
var getUniqueId = (function () {
|
||||
if (typeof fabric.document.documentElement.uniqueID !== 'undefined') {
|
||||
return function (element) {
|
||||
return element.uniqueID;
|
||||
};
|
||||
}
|
||||
var uid = 0;
|
||||
return function (element) {
|
||||
return element.__uniqueID || (element.__uniqueID = 'uniqueID__' + uid++);
|
||||
|
|
|
|||
10
dist/all.min.js
vendored
10
dist/all.min.js
vendored
File diff suppressed because one or more lines are too long
BIN
dist/all.min.js.gz
vendored
BIN
dist/all.min.js.gz
vendored
Binary file not shown.
|
|
@ -12,11 +12,6 @@
|
|||
return true;
|
||||
}
|
||||
var getUniqueId = (function () {
|
||||
if (typeof fabric.document.documentElement.uniqueID !== 'undefined') {
|
||||
return function (element) {
|
||||
return element.uniqueID;
|
||||
};
|
||||
}
|
||||
var uid = 0;
|
||||
return function (element) {
|
||||
return element.__uniqueID || (element.__uniqueID = 'uniqueID__' + uid++);
|
||||
|
|
|
|||
Loading…
Reference in a new issue