mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-01-20 09:41:45 +03:00
fixed _getSafeElemSize()
This commit is contained in:
parent
bf3dd7c031
commit
cb39fb7e32
@ -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 )
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user