mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-04-06 17:31:09 +08:00
Fix viewport context menu not working on touch
This commit is contained in:
parent
20315bf016
commit
723bb4b061
@ -713,11 +713,11 @@ class Preview {
|
||||
unselectInterface(event);
|
||||
convertTouchEvent(event);
|
||||
Preview.selected = this;
|
||||
this.static_rclick = event.which === 3 || event.type == 'touchstart';
|
||||
this.static_rclick = event.which === 3 || event.pointerType == 'touch';
|
||||
if (this.static_rclick) {
|
||||
this.event_start = [event.clientX, event.clientY];
|
||||
}
|
||||
if (event.type == 'touchstart') {
|
||||
if (event.pointerType == 'touch') {
|
||||
this.rclick_cooldown = setTimeout(() => {
|
||||
this.rclick_cooldown = true;
|
||||
}, 420)
|
||||
@ -1092,7 +1092,7 @@ class Preview {
|
||||
this.selection.client_x = event.clientX+0
|
||||
this.selection.client_y = event.clientY+0
|
||||
|
||||
if (Modes.edit && event.type !== 'touchstart') {
|
||||
if (Modes.edit && event.pointerType != 'touch') {
|
||||
$(this.node).append(this.selection.box)
|
||||
this.selection.activated = false;
|
||||
this.selection.old_selected = Outliner.selected.slice();
|
||||
|
Loading…
x
Reference in New Issue
Block a user