Skip to content

Commit 1afe2c2

Browse files
authored
Merge pull request #442 from neftaly/mapcontrols
Map controls
2 parents 82c1b03 + 3d34cde commit 1afe2c2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

docs/handles/screen-handle-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ Allows you to configure the pan speed and a filter function to disable panning o
5252
## Map Handles
5353
*alias for `MapControls`*
5454

55-
Map handles have the same properties and functionality as the orbit handles but move the camera's transform origin only in the X and Y planes, which is perfect for building applications with a flat map.
55+
Map handles have the same properties and functionality as the orbit handles but move the camera's transform origin only in the X and Z plane, which is perfect for building applications with a flat map.

packages/handle/src/screen/map.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function defaultMapHandlesScreenCameraApply(
2020
store: StoreApi<ScreenCameraState>,
2121
) {
2222
if (update.pitch != null) {
23-
update.pitch = clamp(update.pitch, 0, Math.PI / 2)
23+
update.pitch = clamp(update.pitch, -Math.PI / 2, 0)
2424
}
2525
store.setState(update)
2626
}
@@ -60,6 +60,8 @@ export class MapHandles {
6060
this.getCamera,
6161
filterForOnePointerLeftClick,
6262
defaultMapHandlesScreenCameraApply,
63+
1,
64+
'xz',
6365
)
6466
this.zoom = new ZoomScreenHandleStore(store, this.getCamera, undefined, defaultMapHandlesScreenCameraApply)
6567
}

0 commit comments

Comments
 (0)