From e47210d0bd9f4d31f49c9e6e6c22b93c5d203262 Mon Sep 17 00:00:00 2001 From: pnorcrss Date: Wed, 31 Jul 2013 14:10:44 -0500 Subject: [PATCH] refactored _getSafeElemSize() --- src/viewer.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/viewer.js b/src/viewer.js index 80b16dd2..249ba52e 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -1114,12 +1114,12 @@ $.extend( $.Viewer.prototype, $.EventHandler.prototype, $.ControlDock.prototype, * @private */ function _getSafeElemSize (oElement) { - var _oElementSize = $.getElementSize(oElement); + oElement = $.getElement( oElement ); - return new $.Point ( - ( _oElementSize.x === 0 ? 1 : _oElementSize.x ), - ( _oElementSize.y === 0 ? 1 : _oElementSize.y ) - ); + return new $.Point( + (oElement.clientWidth === 0 ? 1 : oElement.clientWidth), + (oElement.clientHeight === 0 ? 1 : oElement.clientHeight) + ); } /**