mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 21:26:10 +03:00
refactored _getSafeElemSize()
This commit is contained in:
parent
cb39fb7e32
commit
e47210d0bd
@ -1114,11 +1114,11 @@ $.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)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user