Skip to content

Commit

Permalink
fix: Make MapControls domElement parameter optional (#48)
Browse files Browse the repository at this point in the history
This should be the only change needed in `three-stdlib` to close #47. I'm following with another change in drei.

We don't want to pass domElement to MapControls as it causes a side effect.
  • Loading branch information
hasparus authored Apr 2, 2021
1 parent 27dc5dd commit 017051d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controls/OrbitControls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ class OrbitControls extends EventDispatcher {
// Pan - left mouse, or arrow keys / touch: one-finger move

class MapControls extends OrbitControls {
constructor(object: Camera, domElement: HTMLElement) {
constructor(object: Camera, domElement?: HTMLElement) {
super(object, domElement)

this.screenSpacePanning = false // pan orthogonal to world-space direction camera.up
Expand Down

1 comment on commit 017051d

@vercel
Copy link

@vercel vercel bot commented on 017051d Apr 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.