mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-04-17 12:50:57 +00:00
Reverse checks currentStyle & getComputedStyle => first check getComputedStyle and then currentStyle
This commit is contained in:
parent
a6eab8d4e2
commit
46256f2eeb
1 changed files with 6 additions and 6 deletions
|
|
@ -144,14 +144,14 @@
|
|||
function getElementStyle(element, attr) {
|
||||
element.style = element.style || { };
|
||||
|
||||
if (element.currentStyle) {
|
||||
return element.currentStyle[attr];
|
||||
}
|
||||
else if (fabric.document.defaultView && fabric.document.defaultView.getComputedStyle) {
|
||||
if (fabric.document.defaultView && fabric.document.defaultView.getComputedStyle) {
|
||||
return fabric.document.defaultView.getComputedStyle(element, null)[attr];
|
||||
}
|
||||
|
||||
return element.style[attr];
|
||||
else {
|
||||
var value = element.style[attr];
|
||||
if (!value && element.currentStyle) value = element.currentStyle[attr];
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
(function () {
|
||||
|
|
|
|||
Loading…
Reference in a new issue