mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
remove legacy code
This commit is contained in:
parent
c9e182c7a9
commit
8b68abc8e4
26
src/Core.js
26
src/Core.js
@ -196,7 +196,6 @@ _html2canvas.Util.getCSS = function (el, attribute, index) {
|
|||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( window.getComputedStyle ) {
|
|
||||||
if (previousElement !== el) {
|
if (previousElement !== el) {
|
||||||
computedCSS = document.defaultView.getComputedStyle(el, null);
|
computedCSS = document.defaultView.getComputedStyle(el, null);
|
||||||
}
|
}
|
||||||
@ -234,31 +233,6 @@ _html2canvas.Util.getCSS = function (el, attribute, index) {
|
|||||||
val = arr;
|
val = arr;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if ( el.currentStyle ) {
|
|
||||||
// IE 9>
|
|
||||||
if ( isBackgroundSizePosition ) {
|
|
||||||
// Older IE uses -x and -y
|
|
||||||
val = [ toPX( attribute + "X", el.currentStyle[ attribute + "X" ] ), toPX( attribute + "Y", el.currentStyle[ attribute + "Y" ] ) ];
|
|
||||||
} else {
|
|
||||||
|
|
||||||
val = toPX( attribute, el.currentStyle[ attribute ] );
|
|
||||||
|
|
||||||
if (/^(border)/i.test( attribute ) && /^(medium|thin|thick)$/i.test( val )) {
|
|
||||||
switch (val) {
|
|
||||||
case "thin":
|
|
||||||
val = "1px";
|
|
||||||
break;
|
|
||||||
case "medium":
|
|
||||||
val = "0px"; // this is wrong, it should be 3px but IE uses medium for no border as well.. TODO find a work around
|
|
||||||
break;
|
|
||||||
case "thick":
|
|
||||||
val = "5px";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return val;
|
return val;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user