mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-11-21 01:13:37 +08:00
Fix canvas click unselect triggered by rotate key
Fix issue with whitespaces in anim time update variable
This commit is contained in:
parent
de397a66e6
commit
806bbd61a0
@ -318,28 +318,6 @@ class Animation {
|
|||||||
})
|
})
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
editUpdateVariable() {
|
|
||||||
var scope = this;
|
|
||||||
Blockbench.textPrompt('menu.animation.anim_time_update', scope.anim_time_update, function(value) {
|
|
||||||
if (value !== scope.anim_time_update) {
|
|
||||||
Undo.initEdit({animations: [scope]})
|
|
||||||
scope.anim_time_update = value
|
|
||||||
Undo.finishEdit('change animation variable')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
editBlendWeight() {
|
|
||||||
var scope = this;
|
|
||||||
Blockbench.textPrompt('menu.animation.blend_weight', scope.blend_weight, function(value) {
|
|
||||||
if (value !== scope.blend_weight) {
|
|
||||||
Undo.initEdit({animations: [scope]})
|
|
||||||
scope.blend_weight = value
|
|
||||||
Undo.finishEdit('change animation blend weight')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
togglePlayingState(state) {
|
togglePlayingState(state) {
|
||||||
if (!this.selected) {
|
if (!this.selected) {
|
||||||
this.playing = state !== undefined ? state : !this.playing;
|
this.playing = state !== undefined ? state : !this.playing;
|
||||||
@ -521,12 +499,13 @@ class Animation {
|
|||||||
Undo.initEdit({animations: [this]});
|
Undo.initEdit({animations: [this]});
|
||||||
this.loop = form_data.loop;
|
this.loop = form_data.loop;
|
||||||
this.name = form_data.name;
|
this.name = form_data.name;
|
||||||
|
this.createUniqueName();
|
||||||
if (isApp) this.path = form_data.path;
|
if (isApp) this.path = form_data.path;
|
||||||
this.loop = form_data.loop;
|
this.loop = form_data.loop;
|
||||||
this.override = form_data.override;
|
this.override = form_data.override;
|
||||||
this.snapping = Math.clamp(form_data.snapping, 10, 100);
|
this.snapping = Math.clamp(form_data.snapping, 10, 100);
|
||||||
this.anim_time_update = vue_data.anim_time_update;
|
this.anim_time_update = vue_data.anim_time_update.trim().replace(/\n/g, '');
|
||||||
this.blend_weight = vue_data.blend_weight;
|
this.blend_weight = vue_data.blend_weight.trim().replace(/\n/g, '');
|
||||||
Undo.finishEdit('edit animation properties');
|
Undo.finishEdit('edit animation properties');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -663,10 +663,6 @@ THREE.OrbitControls = function ( object, preview ) {
|
|||||||
scope.dispatchEvent( endEvent );
|
scope.dispatchEvent( endEvent );
|
||||||
state = STATE.NONE;
|
state = STATE.NONE;
|
||||||
|
|
||||||
if (scope.hasMoved === false && settings.canvas_unselect.value) {
|
|
||||||
unselectAll()
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
this.stopMovement = function(event) {
|
this.stopMovement = function(event) {
|
||||||
onMouseUp()
|
onMouseUp()
|
||||||
|
@ -612,6 +612,9 @@ class Preview {
|
|||||||
if (typeof Toolbox.selected.onCanvasClick === 'function') {
|
if (typeof Toolbox.selected.onCanvasClick === 'function') {
|
||||||
Toolbox.selected.onCanvasClick(0)
|
Toolbox.selected.onCanvasClick(0)
|
||||||
}
|
}
|
||||||
|
if (!data && this.controls.hasMoved === false && settings.canvas_unselect.value) {
|
||||||
|
unselectAll()
|
||||||
|
}
|
||||||
|
|
||||||
if (this.angle !== null && this.camOrtho.axis || this.movingBackground) {
|
if (this.angle !== null && this.camOrtho.axis || this.movingBackground) {
|
||||||
this.startSelRect(event)
|
this.startSelRect(event)
|
||||||
|
Loading…
Reference in New Issue
Block a user