Skip to content

Commit

Permalink
thusfar
Browse files Browse the repository at this point in the history
  • Loading branch information
bobmagicii committed Oct 23, 2024
1 parent f5a418b commit 3b5639a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 17 additions & 1 deletion app/www/share/atlantis/js/ui/viewport.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import PinchZoom from '/share/atlantis/lib/ui/pinchzoom.js?v=2';
import PinchZoom from '/share/atlantis/lib/ui/pinchzoom.js?v=3';

////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -55,6 +55,7 @@ class Viewport {
////////

this.pinch = new PinchZoom(this.surface.get(0), {
'autoEnable': false,
'minZoom': 0.20,
'maxZoom': 5.0,
'useMouseWheel': true,
Expand Down Expand Up @@ -105,6 +106,21 @@ class Viewport {
return parseFloat(m[1]);
};

////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////

enable() {

this.pinch.enable();
return;
};

disable() {

this.pinch.disable();
return;
};

};

////////////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 2 additions & 0 deletions app/www/share/atlantis/lib/ui/pinchzoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ var definePinchZoom = function () {
this.setupOffsets();
}

if(this.options.autoEnable)
this.enable();

},
Expand All @@ -132,6 +133,7 @@ var definePinchZoom = function () {
PinchZoom.prototype = {

defaults: {
autoEnable: true,
tapZoomFactor: 2,
zoomOutFactor: 1.3,
animationDuration: 300,
Expand Down

0 comments on commit 3b5639a

Please sign in to comment.