| @@ 1466-1492 (lines=27) @@ | ||
| 1463 | left: parseInt(value[3], radix) || 0 |
|
| 1464 | }; |
|
| 1465 | }, |
|
| 1466 | measureBox: function (elm, prefix) { |
|
| 1467 | function getStyle(name) { |
|
| 1468 | var defaultView = elm.ownerDocument.defaultView; |
|
| 1469 | if (defaultView) { |
|
| 1470 | var computedStyle = defaultView.getComputedStyle(elm, null); |
|
| 1471 | if (computedStyle) { |
|
| 1472 | name = name.replace(/[A-Z]/g, function (a) { |
|
| 1473 | return '-' + a; |
|
| 1474 | }); |
|
| 1475 | return computedStyle.getPropertyValue(name); |
|
| 1476 | } else { |
|
| 1477 | return null; |
|
| 1478 | } |
|
| 1479 | } |
|
| 1480 | return elm.currentStyle[name]; |
|
| 1481 | } |
|
| 1482 | function getSide(name) { |
|
| 1483 | var val = parseFloat(getStyle(name)); |
|
| 1484 | return isNaN(val) ? 0 : val; |
|
| 1485 | } |
|
| 1486 | return { |
|
| 1487 | top: getSide(prefix + 'TopWidth'), |
|
| 1488 | right: getSide(prefix + 'RightWidth'), |
|
| 1489 | bottom: getSide(prefix + 'BottomWidth'), |
|
| 1490 | left: getSide(prefix + 'LeftWidth') |
|
| 1491 | }; |
|
| 1492 | } |
|
| 1493 | }; |
|
| 1494 | ||
| 1495 | function noop$1() { |
|
| @@ 926-952 (lines=27) @@ | ||
| 923 | left: parseInt(value[3], radix) || 0 |
|
| 924 | }; |
|
| 925 | }, |
|
| 926 | measureBox: function (elm, prefix) { |
|
| 927 | function getStyle(name) { |
|
| 928 | var defaultView = elm.ownerDocument.defaultView; |
|
| 929 | if (defaultView) { |
|
| 930 | var computedStyle = defaultView.getComputedStyle(elm, null); |
|
| 931 | if (computedStyle) { |
|
| 932 | name = name.replace(/[A-Z]/g, function (a) { |
|
| 933 | return '-' + a; |
|
| 934 | }); |
|
| 935 | return computedStyle.getPropertyValue(name); |
|
| 936 | } else { |
|
| 937 | return null; |
|
| 938 | } |
|
| 939 | } |
|
| 940 | return elm.currentStyle[name]; |
|
| 941 | } |
|
| 942 | function getSide(name) { |
|
| 943 | var val = parseFloat(getStyle(name)); |
|
| 944 | return isNaN(val) ? 0 : val; |
|
| 945 | } |
|
| 946 | return { |
|
| 947 | top: getSide(prefix + 'TopWidth'), |
|
| 948 | right: getSide(prefix + 'RightWidth'), |
|
| 949 | bottom: getSide(prefix + 'BottomWidth'), |
|
| 950 | left: getSide(prefix + 'LeftWidth') |
|
| 951 | }; |
|
| 952 | } |
|
| 953 | }; |
|
| 954 | ||
| 955 | function noop$1() { |
|