fixed _getSafeElemSize()

This commit is contained in:
pnorcrss 2013-07-31 14:01:46 -05:00
parent bf3dd7c031
commit cb39fb7e32

View File

@ -1113,9 +1113,13 @@ $.extend( $.Viewer.prototype, $.EventHandler.prototype, $.ControlDock.prototype,
* @return {[NaN]} * @return {[NaN]}
* @private * @private
*/ */
function _getSafeElemSize () { function _getSafeElemSize (oElement) {
var _nElementSize = $.getElementSize(); var _oElementSize = $.getElementSize(oElement);
return isNaN(_nElementSize) ? 0 : _nElementSize;
return new $.Point (
( _oElementSize.x === 0 ? 1 : _oElementSize.x ),
( _oElementSize.y === 0 ? 1 : _oElementSize.y )
);
} }
/** /**