mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-01-20 01:31: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]}
|
||||
* @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 )
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user