| @@ 2284-2335 (lines=52) @@ | ||
| 2281 | } |
|
| 2282 | return curRect; |
|
| 2283 | }, |
|
| 2284 | repaint: function () { |
|
| 2285 | var self$$1 = this; |
|
| 2286 | var style, bodyStyle, bodyElm, rect, borderBox; |
|
| 2287 | var borderW, borderH, lastRepaintRect, round, value; |
|
| 2288 | round = !document.createRange ? Math.round : function (value) { |
|
| 2289 | return value; |
|
| 2290 | }; |
|
| 2291 | style = self$$1.getEl().style; |
|
| 2292 | rect = self$$1._layoutRect; |
|
| 2293 | lastRepaintRect = self$$1._lastRepaintRect || {}; |
|
| 2294 | borderBox = self$$1.borderBox; |
|
| 2295 | borderW = borderBox.left + borderBox.right; |
|
| 2296 | borderH = borderBox.top + borderBox.bottom; |
|
| 2297 | if (rect.x !== lastRepaintRect.x) { |
|
| 2298 | style.left = round(rect.x) + 'px'; |
|
| 2299 | lastRepaintRect.x = rect.x; |
|
| 2300 | } |
|
| 2301 | if (rect.y !== lastRepaintRect.y) { |
|
| 2302 | style.top = round(rect.y) + 'px'; |
|
| 2303 | lastRepaintRect.y = rect.y; |
|
| 2304 | } |
|
| 2305 | if (rect.w !== lastRepaintRect.w) { |
|
| 2306 | value = round(rect.w - borderW); |
|
| 2307 | style.width = (value >= 0 ? value : 0) + 'px'; |
|
| 2308 | lastRepaintRect.w = rect.w; |
|
| 2309 | } |
|
| 2310 | if (rect.h !== lastRepaintRect.h) { |
|
| 2311 | value = round(rect.h - borderH); |
|
| 2312 | style.height = (value >= 0 ? value : 0) + 'px'; |
|
| 2313 | lastRepaintRect.h = rect.h; |
|
| 2314 | } |
|
| 2315 | if (self$$1._hasBody && rect.innerW !== lastRepaintRect.innerW) { |
|
| 2316 | value = round(rect.innerW); |
|
| 2317 | bodyElm = self$$1.getEl('body'); |
|
| 2318 | if (bodyElm) { |
|
| 2319 | bodyStyle = bodyElm.style; |
|
| 2320 | bodyStyle.width = (value >= 0 ? value : 0) + 'px'; |
|
| 2321 | } |
|
| 2322 | lastRepaintRect.innerW = rect.innerW; |
|
| 2323 | } |
|
| 2324 | if (self$$1._hasBody && rect.innerH !== lastRepaintRect.innerH) { |
|
| 2325 | value = round(rect.innerH); |
|
| 2326 | bodyElm = bodyElm || self$$1.getEl('body'); |
|
| 2327 | if (bodyElm) { |
|
| 2328 | bodyStyle = bodyStyle || bodyElm.style; |
|
| 2329 | bodyStyle.height = (value >= 0 ? value : 0) + 'px'; |
|
| 2330 | } |
|
| 2331 | lastRepaintRect.innerH = rect.innerH; |
|
| 2332 | } |
|
| 2333 | self$$1._lastRepaintRect = lastRepaintRect; |
|
| 2334 | self$$1.fire('repaint', {}, false); |
|
| 2335 | }, |
|
| 2336 | updateLayoutRect: function () { |
|
| 2337 | var self$$1 = this; |
|
| 2338 | self$$1.parent()._lastRect = null; |
|
| @@ 1775-1826 (lines=52) @@ | ||
| 1772 | } |
|
| 1773 | return curRect; |
|
| 1774 | }, |
|
| 1775 | repaint: function () { |
|
| 1776 | var self$$1 = this; |
|
| 1777 | var style, bodyStyle, bodyElm, rect, borderBox; |
|
| 1778 | var borderW, borderH, lastRepaintRect, round, value; |
|
| 1779 | round = !document.createRange ? Math.round : function (value) { |
|
| 1780 | return value; |
|
| 1781 | }; |
|
| 1782 | style = self$$1.getEl().style; |
|
| 1783 | rect = self$$1._layoutRect; |
|
| 1784 | lastRepaintRect = self$$1._lastRepaintRect || {}; |
|
| 1785 | borderBox = self$$1.borderBox; |
|
| 1786 | borderW = borderBox.left + borderBox.right; |
|
| 1787 | borderH = borderBox.top + borderBox.bottom; |
|
| 1788 | if (rect.x !== lastRepaintRect.x) { |
|
| 1789 | style.left = round(rect.x) + 'px'; |
|
| 1790 | lastRepaintRect.x = rect.x; |
|
| 1791 | } |
|
| 1792 | if (rect.y !== lastRepaintRect.y) { |
|
| 1793 | style.top = round(rect.y) + 'px'; |
|
| 1794 | lastRepaintRect.y = rect.y; |
|
| 1795 | } |
|
| 1796 | if (rect.w !== lastRepaintRect.w) { |
|
| 1797 | value = round(rect.w - borderW); |
|
| 1798 | style.width = (value >= 0 ? value : 0) + 'px'; |
|
| 1799 | lastRepaintRect.w = rect.w; |
|
| 1800 | } |
|
| 1801 | if (rect.h !== lastRepaintRect.h) { |
|
| 1802 | value = round(rect.h - borderH); |
|
| 1803 | style.height = (value >= 0 ? value : 0) + 'px'; |
|
| 1804 | lastRepaintRect.h = rect.h; |
|
| 1805 | } |
|
| 1806 | if (self$$1._hasBody && rect.innerW !== lastRepaintRect.innerW) { |
|
| 1807 | value = round(rect.innerW); |
|
| 1808 | bodyElm = self$$1.getEl('body'); |
|
| 1809 | if (bodyElm) { |
|
| 1810 | bodyStyle = bodyElm.style; |
|
| 1811 | bodyStyle.width = (value >= 0 ? value : 0) + 'px'; |
|
| 1812 | } |
|
| 1813 | lastRepaintRect.innerW = rect.innerW; |
|
| 1814 | } |
|
| 1815 | if (self$$1._hasBody && rect.innerH !== lastRepaintRect.innerH) { |
|
| 1816 | value = round(rect.innerH); |
|
| 1817 | bodyElm = bodyElm || self$$1.getEl('body'); |
|
| 1818 | if (bodyElm) { |
|
| 1819 | bodyStyle = bodyStyle || bodyElm.style; |
|
| 1820 | bodyStyle.height = (value >= 0 ? value : 0) + 'px'; |
|
| 1821 | } |
|
| 1822 | lastRepaintRect.innerH = rect.innerH; |
|
| 1823 | } |
|
| 1824 | self$$1._lastRepaintRect = lastRepaintRect; |
|
| 1825 | self$$1.fire('repaint', {}, false); |
|
| 1826 | }, |
|
| 1827 | updateLayoutRect: function () { |
|
| 1828 | var self$$1 = this; |
|
| 1829 | self$$1.parent()._lastRect = null; |
|