mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-02-17 16:20:13 +08:00
Fix issue with mobile tool bar in display mode
Fix undo issue when rotating mesh on X axis
This commit is contained in:
parent
21b741ad5c
commit
027a52942f
@ -1404,7 +1404,7 @@ class Preview {
|
||||
}
|
||||
Preview.selected = this;
|
||||
quad_previews.enabled = false;
|
||||
$('#preview').empty()
|
||||
$('#preview > .quad_canvas_wrapper, #preview > .single_canvas_wrapper').remove()
|
||||
|
||||
var wrapper = $('<div class="single_canvas_wrapper"></div>')
|
||||
wrapper.append(this.node)
|
||||
|
@ -1281,7 +1281,7 @@ BARS.defineActions(function() {
|
||||
Canvas.updatePositions()
|
||||
},
|
||||
onBefore: function() {
|
||||
Undo.initEdit({elements: Cube.selected, group: Group.selected})
|
||||
Undo.initEdit({elements: Outliner.selected.filter(el => el.rotatable), group: Group.selected})
|
||||
},
|
||||
onAfter: function() {
|
||||
Undo.finishEdit(getRotationObject() instanceof Group ? 'Rotate group' : 'Rotate elements');
|
||||
@ -1308,7 +1308,7 @@ BARS.defineActions(function() {
|
||||
Canvas.updatePositions()
|
||||
},
|
||||
onBefore: function() {
|
||||
Undo.initEdit({elements: selected, group: Group.selected})
|
||||
Undo.initEdit({elements: Outliner.selected.filter(el => el.rotatable), group: Group.selected})
|
||||
},
|
||||
onAfter: function() {
|
||||
Undo.finishEdit(getRotationObject() instanceof Group ? 'Rotate group' : 'Rotate elements');
|
||||
@ -1335,19 +1335,13 @@ BARS.defineActions(function() {
|
||||
Canvas.updatePositions()
|
||||
},
|
||||
onBefore: function() {
|
||||
Undo.initEdit({elements: selected, group: Group.selected})
|
||||
Undo.initEdit({elements: Outliner.selected.filter(el => el.rotatable), group: Group.selected})
|
||||
},
|
||||
onAfter: function() {
|
||||
Undo.finishEdit(getRotationObject() instanceof Group ? 'Rotate group' : 'Rotate elements');
|
||||
},
|
||||
getInterval: getRotationInterval
|
||||
})
|
||||
function rotateCondition() {
|
||||
return (Modes.edit && (
|
||||
(Format.bone_rig && Group.selected) ||
|
||||
(Format.rotate_cubes && Cube.selected.length)
|
||||
))
|
||||
}
|
||||
|
||||
//Origin
|
||||
function moveOriginOnAxis(modify, axis) {
|
||||
|
Loading…
Reference in New Issue
Block a user