Skip to content

Commit

Permalink
Little outliner fix on touch devices
Browse files Browse the repository at this point in the history
  • Loading branch information
JannisX11 committed May 30, 2024
1 parent e1805d5 commit ce31c41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions js/outliner/group.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,10 @@ class Group extends OutlinerNode {
Canvas.updateAllBones([this]);
return this;
}
select(event, isOutlinerClick) {
select(event, is_outliner_click) {
var scope = this;
if (Blockbench.hasFlag('renaming') || this.locked) return this;
if (!event) event = true
if (isOutlinerClick && event.pointerType == 'touch') return;
var allSelected = Group.selected === this && selected.length && this.matchesSelection()

//Clear Old Group
Expand Down
3 changes: 1 addition & 2 deletions js/outliner/outliner.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,6 @@ class OutlinerElement extends OutlinerNode {
Blockbench.showQuickMessage('message.group_required_to_animate');
return false;
}
if (event instanceof PointerEvent && event.pointerType == 'touch') return;
//Shift
var just_selected = []
if (event && (event.shiftKey === true || Pressing.overrides.shift) && this.getParentArray().includes(selected[selected.length-1]) && !Modes.paint && is_outliner_click) {
Expand Down Expand Up @@ -1398,7 +1397,7 @@ Interface.definePanels(function() {
v-bind:style="{'padding-left': indentation + 'px'}"
@contextmenu.prevent.stop="node.showContextMenu($event)"
@click="node.select($event, true)"
@touchstart="node.select($event, true)" :title="node.title"
:title="node.title"
@dblclick.stop.self="!node.locked && renameOutliner()"
>` +
//Opener
Expand Down

0 comments on commit ce31c41

Please sign in to comment.