mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-11-21 01:13:37 +08:00
Fix issue with exploded skin view in multiple tabs
Improve GIF cropping
This commit is contained in:
parent
0744daa301
commit
2b038c7b72
@ -1088,10 +1088,10 @@
|
||||
.gif_recording_frame_handle.gif_resize_nw {cursor: nw-resize}
|
||||
.gif_recording_frame_handle.gif_resize_se {cursor: se-resize}
|
||||
.gif_recording_frame_handle.gif_resize_sw {cursor: sw-resize}
|
||||
.gif_recording_frame_handle.gif_resize_ne i {transform: rotate(135deg);}
|
||||
.gif_recording_frame_handle.gif_resize_nw i {transform: rotate(45deg);}
|
||||
.gif_recording_frame_handle.gif_resize_se i {transform: rotate(225deg);}
|
||||
.gif_recording_frame_handle.gif_resize_sw i {transform: rotate(-45deg);}
|
||||
.gif_recording_frame_handle.gif_resize_ne i {transform: rotate(-45deg);}
|
||||
.gif_recording_frame_handle.gif_resize_nw i {transform: rotate(225deg);}
|
||||
.gif_recording_frame_handle.gif_resize_se i {transform: rotate(45deg);}
|
||||
.gif_recording_frame_handle.gif_resize_sw i {transform: rotate(135deg);}
|
||||
|
||||
/* Amend Edit Menu */
|
||||
#amend_edit_menu {
|
||||
|
@ -318,13 +318,14 @@ BARS.defineActions(function() {
|
||||
cube.from.V3_add(center);
|
||||
cube.to.V3_add(center);
|
||||
})
|
||||
Project.explode_skin_model = exploded_view;
|
||||
Undo.finishEdit(exploded_view ? 'Explode skin model' : 'Revert exploding skin model', {elements: Cube.all, exploded_view: exploded_view});
|
||||
Canvas.updateAllPositions();
|
||||
this.setIcon(this.icon);
|
||||
}
|
||||
})
|
||||
Blockbench.on('reset_project', () => {
|
||||
explode_skin_model.value = false;
|
||||
Blockbench.on('select_project', () => {
|
||||
explode_skin_model.value = Project.explode_skin_model;
|
||||
explode_skin_model.updateEnabledState();
|
||||
})
|
||||
Blockbench.on('load_undo_save', data => {
|
||||
|
@ -25,6 +25,7 @@ class ModelProject {
|
||||
this.mode = 'edit';
|
||||
this.view_mode = 'textured';
|
||||
this.display_uv = settings.show_only_selected_uv.value ? 'selected_faces' :'selected_elements';
|
||||
this.explode_skin_model = false;
|
||||
this.previews = {};
|
||||
this.EditSession = null;
|
||||
|
||||
|
@ -1756,7 +1756,7 @@ class OrbitGizmo {
|
||||
|
||||
|
||||
window.addEventListener("gamepadconnected", function(event) {
|
||||
if (event.gamepad.id.includes('SpaceMouse') || event.gamepad.id.includes('SpaceNavigator')) {
|
||||
if (event.gamepad.id.includes('SpaceMouse') || event.gamepad.id.includes('SpaceNavigator') || event.gamepad.id.includes('3Dconnexion')) {
|
||||
|
||||
let interval = setInterval(() => {
|
||||
let gamepad = navigator.getGamepads()[event.gamepad.index];
|
||||
|
@ -288,10 +288,10 @@ const Screencam = {
|
||||
frame.remove();
|
||||
}
|
||||
function updateCrop() {
|
||||
crop.left = Math.clamp(crop.left, 0, preview.width/2 - 12);
|
||||
crop.right = Math.clamp(crop.right, 0, preview.width/2 - 12);
|
||||
crop.top = Math.clamp(crop.top, 0, preview.height/2 - 12);
|
||||
crop.bottom = Math.clamp(crop.bottom, 0, preview.height/2 - 12);
|
||||
crop.left = Math.clamp(crop.left, 0, preview.width/2 - 20);
|
||||
crop.right = Math.clamp(crop.right, 0, preview.width/2 - 20);
|
||||
crop.top = Math.clamp(crop.top, 0, preview.height/2 - 20);
|
||||
crop.bottom = Math.clamp(crop.bottom, 0, preview.height/2 - 20);
|
||||
frame.style.top = crop.top + 'px';
|
||||
frame.style.left = crop.left + 'px';
|
||||
frame.style.right = crop.right + 'px';
|
||||
|
Loading…
Reference in New Issue
Block a user