fix: made updatePixelDensityRatio private

Prefixed it with a underscore and added @private annotation
This commit is contained in:
ronnymikalsen 2021-03-25 14:41:11 +01:00
parent 89d4499c2f
commit 7ab493d18b

View File

@ -427,7 +427,7 @@ $.Viewer = function( options ) {
} }
// Add updatePixelDensityRatio to resize event // Add updatePixelDensityRatio to resize event
$.addEvent( window, 'resize', this.updatePixelDensityRatio.bind(this) ); $.addEvent( window, 'resize', this._updatePixelDensityRatio.bind(this) );
//Instantiate a navigator if configured //Instantiate a navigator if configured
if ( this.showNavigator){ if ( this.showNavigator){
@ -1614,8 +1614,9 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
/** /**
* Update pixel density ration, clears all tiles and triggers updates for * Update pixel density ration, clears all tiles and triggers updates for
* all items. * all items.
* @private
*/ */
updatePixelDensityRatio: function() { _updatePixelDensityRatio: function() {
var previusPixelDensityRatio = $.pixelDensityRatio; var previusPixelDensityRatio = $.pixelDensityRatio;
var currentPixelDensityRatio = $.getCurrentPixelDensityRatio(); var currentPixelDensityRatio = $.getCurrentPixelDensityRatio();
if (previusPixelDensityRatio !== currentPixelDensityRatio) { if (previusPixelDensityRatio !== currentPixelDensityRatio) {