diff --git a/src/viewer.js b/src/viewer.js index ecb22a19..80b16dd2 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -1113,9 +1113,13 @@ $.extend( $.Viewer.prototype, $.EventHandler.prototype, $.ControlDock.prototype, * @return {[NaN]} * @private */ -function _getSafeElemSize () { - var _nElementSize = $.getElementSize(); - return isNaN(_nElementSize) ? 0 : _nElementSize; +function _getSafeElemSize (oElement) { + var _oElementSize = $.getElementSize(oElement); + + return new $.Point ( + ( _oElementSize.x === 0 ? 1 : _oElementSize.x ), + ( _oElementSize.y === 0 ? 1 : _oElementSize.y ) + ); } /**