Skip to content

Commit 0e28c7b

Browse files
authored
fix disable-zoom for touch (#3445)
1 parent bd7cc55 commit 0e28c7b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/model-viewer/src/three-components/SmoothControls.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,11 @@ export class SmoothControls extends EventDispatcher {
784784
if (this.pointers.length === 1) {
785785
this.touchMode = this.touchModeRotate;
786786
} else {
787+
if (this._disableZoom) {
788+
this.touchMode = null;
789+
this.element.removeEventListener('touchmove', this.disableScroll);
790+
return;
791+
}
787792
this.touchMode = (this.touchDecided && this.touchMode === null) ?
788793
null :
789794
this.touchModeZoom;

0 commit comments

Comments
 (0)