|
|
@@ -831,16 +831,16 @@ export class TLApp<
|
|
|
}
|
|
|
|
|
|
readonly onWheel: TLEvents<S, K>['wheel'] = (info, e) => {
|
|
|
+ if (e.ctrlKey) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
this.viewport.panCamera(info.delta)
|
|
|
this.inputs.onWheel([...this.viewport.getPagePoint([e.clientX, e.clientY]), 0.5], e)
|
|
|
}
|
|
|
|
|
|
readonly onPointerDown: TLEvents<S, K>['pointer'] = (info, e) => {
|
|
|
- // Switch to select on right click to enable contextMenu state
|
|
|
- if (e.button === 2) {
|
|
|
- this.transition('select', info)
|
|
|
- return
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
// Pan canvas when holding middle click
|
|
|
if (!this.editingShape && e.button === 1 && !this.isIn('move')) {
|
|
|
@@ -848,6 +848,12 @@ export class TLApp<
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+ // Switch to select on right click to enable contextMenu state
|
|
|
+ if (e.button === 2) {
|
|
|
+ this.transition('select')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
if ('clientX' in e) {
|
|
|
this.inputs.onPointerDown(
|
|
|
[...this.viewport.getPagePoint([e.clientX, e.clientY]), 0.5],
|