Skip to content

Commit

Permalink
Fix mobile panels displaying when not selected
Browse files Browse the repository at this point in the history
Fix unable to select animations on mobile
  • Loading branch information
JannisX11 committed Dec 8, 2023
1 parent 0f2690b commit 11b4e05
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions js/animations/timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ const Timeline = {
},
revealTime(time) {
let body = document.getElementById('timeline_body');
if (!body) return;
var scroll = body.scrollLeft;
var playhead = time * Timeline.vue._data.size + 8;
if (playhead < scroll || playhead > scroll + document.getElementById('timeline_vue').clientWidth - Timeline.vue._data.head_width) {
Expand Down
16 changes: 9 additions & 7 deletions js/modes.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,17 @@ class Mode extends KeybindItem {
}

UVEditor.beforeMoving();
for (let id in Panels) {
let old_pos_data = Panels[id].position_data;
Panels[id].position_data = Interface.getModeData().panels[id];
if (!Panels[id].position_data) {
Panels[id].position_data = Interface.getModeData().panels[id] = JSON.parse(JSON.stringify(old_pos_data))
if (!Blockbench.isMobile) {
for (let id in Panels) {
let old_pos_data = Panels[id].position_data;
Panels[id].position_data = Interface.getModeData().panels[id];
if (!Panels[id].position_data) {
Panels[id].position_data = Interface.getModeData().panels[id] = JSON.parse(JSON.stringify(old_pos_data))
}
Panels[id].updateSlot();
}
Panels[id].updateSlot();
updateSidebarOrder();
}
updateSidebarOrder();

Canvas.updateRenderSides()
if (this.tool && BarItems[this.tool] && Condition(BarItems[this.tool])) {
Expand Down

0 comments on commit 11b4e05

Please sign in to comment.