remove legacy code

This commit is contained in:
MoyuScript 2013-01-11 20:38:33 +02:00
parent c9e182c7a9
commit 8b68abc8e4

View File

@ -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;
}; };