refactored _getSafeElemSize()

This commit is contained in:
pnorcrss 2013-07-31 14:10:44 -05:00
parent cb39fb7e32
commit e47210d0bd

View File

@ -1114,11 +1114,11 @@ $.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 )
(oElement.clientWidth === 0 ? 1 : oElement.clientWidth),
(oElement.clientHeight === 0 ? 1 : oElement.clientHeight)
);
}