mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-02-17 16:20:13 +08:00
Fix selecting keyframes from validator not switching to anim mode
Fixed some issues from recent GIF recorder pull request
This commit is contained in:
parent
d2e9d39dcc
commit
17b04c793c
@ -461,6 +461,9 @@ class Keyframe {
|
||||
}
|
||||
|
||||
showInTimeline() {
|
||||
if (!Modes.animate) {
|
||||
Modes.options.animate.select()
|
||||
}
|
||||
if (!this.animator.animation.selected) {
|
||||
this.animator.animation.select();
|
||||
}
|
||||
|
@ -640,17 +640,17 @@ const Screencam = {
|
||||
vars.frame.append(vars.frame_label);
|
||||
|
||||
if (options.resolution) {
|
||||
crop.left = crop.right = (preview.width - options.resolution[0] / window.devicePixelRatio) / 2;
|
||||
crop.top = crop.bottom = (preview.height - options.resolution[1] / window.devicePixelRatio) / 2;
|
||||
vars.crop.left = vars.crop.right = (preview.width - options.resolution[0] / window.devicePixelRatio) / 2;
|
||||
vars.crop.top = vars.crop.bottom = (preview.height - options.resolution[1] / window.devicePixelRatio) / 2;
|
||||
}
|
||||
function drag(e1) {
|
||||
let crop_original = Object.assign({}, crop);
|
||||
let crop_original = Object.assign({}, vars.crop);
|
||||
function move(e2) {
|
||||
convertTouchEvent(e2);
|
||||
crop.left = crop_original.left + (e2.clientX - e1.clientX);
|
||||
crop.right = crop_original.right - (e2.clientX - e1.clientX);
|
||||
crop.top = crop_original.top + (e2.clientY - e1.clientY);
|
||||
crop.bottom = crop_original.bottom - (e2.clientY - e1.clientY);
|
||||
vars.crop.left = crop_original.left + (e2.clientX - e1.clientX);
|
||||
vars.crop.right = crop_original.right - (e2.clientX - e1.clientX);
|
||||
vars.crop.top = crop_original.top + (e2.clientY - e1.clientY);
|
||||
vars.crop.bottom= crop_original.bottom - (e2.clientY - e1.clientY);
|
||||
custom_resolution = false;
|
||||
updateCrop();
|
||||
}
|
||||
@ -669,11 +669,11 @@ const Screencam = {
|
||||
let resizer_bottom_left = Interface.createElement('div', {style: 'bottom: -2px; left: -2px;', class: 'gif_recording_frame_handle gif_resize_sw'}, Blockbench.getIconNode('arrow_back_ios'));
|
||||
|
||||
function resize(e1, x_value, y_value) {
|
||||
let crop_original = Object.assign({}, crop);
|
||||
let crop_original = Object.assign({}, vars.crop);
|
||||
function move(e2) {
|
||||
convertTouchEvent(e2);
|
||||
crop[x_value] = crop_original[x_value] + (e2.clientX - e1.clientX) * (x_value == 'left' ? 1 : -1);
|
||||
crop[y_value] = crop_original[y_value] + (e2.clientY - e1.clientY) * (y_value == 'top' ? 1 : -1);
|
||||
vars.crop[x_value] = crop_original[x_value] + (e2.clientX - e1.clientX) * (x_value == 'left' ? 1 : -1);
|
||||
vars.crop[y_value] = crop_original[y_value] + (e2.clientY - e1.clientY) * (y_value == 'top' ? 1 : -1);
|
||||
custom_resolution = false;
|
||||
updateCrop();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user