Skip to content

Commit

Permalink
Merge pull request #6629 from inaridarkfox4231/fix-zoomFlag-to-execut…
Browse files Browse the repository at this point in the history
…eZoom

Fix bug in orbitControl() where scaling with the mouse wheel worked even outside the canvas.
  • Loading branch information
davepagurek authored Dec 16, 2023
2 parents a1748ee + b001615 commit c9e2ee1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/webgl/interaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ p5.prototype.orbitControl = function(
if (pointersInCanvas) this._renderer.executeZoom = true;
} else {
// quit zoom when you stop wheeling.
this._renderer.zoomFlag = false;
this._renderer.executeZoom = false;
}
if (this.mouseIsPressed) {
if (this.mouseButton === this.LEFT) {
Expand Down

0 comments on commit c9e2ee1

Please sign in to comment.