@@ -219,10 +219,10 @@ class Cytoscape extends Component {
219
219
const originalMinZoomFn = cy . minZoom ;
220
220
221
221
// Override the maxZoom function to trigger maxZoomChange custom event
222
- cy . maxZoom = function ( e ) {
222
+ cy . maxZoom = function ( e ) {
223
223
const currentMaxZoom = originalMaxZoomFn . call ( cy , e ) ;
224
-
225
- // Trigger your custom event if the current max zoom level is different from the
224
+
225
+ // Trigger your custom event if the current max zoom level is different from the
226
226
// previously stored max zoom level
227
227
if ( currentMaxZoom !== cy . _previousMaxZoom ) {
228
228
cy . _previousMaxZoom = currentMaxZoom ;
@@ -232,10 +232,10 @@ class Cytoscape extends Component {
232
232
} ;
233
233
234
234
// Override the minZoom function to trigger minZoomChange custom event
235
- cy . minZoom = function ( e ) {
235
+ cy . minZoom = function ( e ) {
236
236
const currentMinZoom = originalMinZoomFn . call ( cy , e ) ;
237
-
238
- // Trigger your custom event if the current min zoom level is different from the
237
+
238
+ // Trigger your custom event if the current min zoom level is different from the
239
239
// previously stored min zoom level
240
240
if ( currentMinZoom !== cy . _previousMinZoom ) {
241
241
cy . _previousMinZoom = currentMinZoom ;
@@ -353,7 +353,7 @@ class Cytoscape extends Component {
353
353
354
354
// Refresh layout if current zoom is out of boundaries
355
355
cy . on ( 'minMaxZoomChange' , function ( ) {
356
- var zoom = cy . zoom ( ) ;
356
+ const zoom = cy . zoom ( ) ;
357
357
if ( zoom > cy . maxZoom ( ) || zoom < cy . minZoom ( ) ) {
358
358
cy . fit ( ) ;
359
359
}
0 commit comments