From 7ab493d18bab0322b2599338af0d83f5043b426e Mon Sep 17 00:00:00 2001 From: ronnymikalsen Date: Thu, 25 Mar 2021 14:41:11 +0100 Subject: [PATCH] fix: made updatePixelDensityRatio private Prefixed it with a underscore and added @private annotation --- src/viewer.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/viewer.js b/src/viewer.js index d6bf83f3..1dc39124 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -427,7 +427,7 @@ $.Viewer = function( options ) { } // Add updatePixelDensityRatio to resize event - $.addEvent( window, 'resize', this.updatePixelDensityRatio.bind(this) ); + $.addEvent( window, 'resize', this._updatePixelDensityRatio.bind(this) ); //Instantiate a navigator if configured 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 * all items. + * @private */ - updatePixelDensityRatio: function() { + _updatePixelDensityRatio: function() { var previusPixelDensityRatio = $.pixelDensityRatio; var currentPixelDensityRatio = $.getCurrentPixelDensityRatio(); if (previusPixelDensityRatio !== currentPixelDensityRatio) {