refactored _getSafeElemSize()

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

View File

@ -1114,12 +1114,12 @@ $.extend( $.Viewer.prototype, $.EventHandler.prototype, $.ControlDock.prototype,
* @private * @private
*/ */
function _getSafeElemSize (oElement) { function _getSafeElemSize (oElement) {
var _oElementSize = $.getElementSize(oElement); oElement = $.getElement( oElement );
return new $.Point ( return new $.Point(
( _oElementSize.x === 0 ? 1 : _oElementSize.x ), (oElement.clientWidth === 0 ? 1 : oElement.clientWidth),
( _oElementSize.y === 0 ? 1 : _oElementSize.y ) (oElement.clientHeight === 0 ? 1 : oElement.clientHeight)
); );
} }
/** /**