Visual tweaks

Fix keyframe copy-pasting
This commit is contained in:
JannisX11 2020-10-17 15:17:27 +02:00
parent 85d555be79
commit 3208e0e9bd
6 changed files with 16 additions and 17 deletions

View File

@ -442,11 +442,11 @@
position: absolute;
background-color: var(--color-ui);
color: var(--color-text);
border: 1px solid var(--color-bright_ui);
padding: 2px 6px;
box-shadow: 0 0 4px black;
margin-top: 4px;
margin-top: 1px;
font-size: 0.84em;
margin-left: -6px;
margin-left: -5px;
opacity: 0;
}
.tool:hover > .tooltip .tooltip_description {

View File

@ -1227,12 +1227,11 @@ const Animator = {
}
}
},
showMotionTrail() {
let target = Group.selected;
showMotionTrail(target = Group.selected) {
let animation = Animation.selected;
let currentTime = Timeline.time;
let step = Timeline.getStep();
let max_time = Math.max(Timeline.time, animation.length);
let max_time = Math.max(Timeline.time, animation.getMaxLength());
if (!max_time) max_time = 1;
let start_time = 0;
if (max_time > 20) {

View File

@ -653,7 +653,7 @@ BARS.defineActions(function() {
}
})
new Action('change_keyframe_file', {
icon: 'fa-file-audio',
icon: 'fa-file',
category: 'animation',
condition: () => (isApp && Animator.open && Timeline.selected.length && ['sound', 'particle'].includes(Timeline.selected[0].channel)),
click: function () {

View File

@ -94,7 +94,7 @@ class BarItem {
// description
if (!description.length) return;
description.css('margin-left', '-6px')
description.css('margin-left', '-5px')
var offset = description?.offset()
offset.right = offset.left + parseInt(description.css('width').replace(/px/, '')) - $(window).width()

View File

@ -380,7 +380,7 @@ window.addEventListener('focus', event => {
setTimeout(remove_func, 100);
})
function getInputFocusElement() {
function getFocusedTextInput() {
return $('input[type="text"]:focus, input[type="number"]:focus, *[contenteditable="true"]:focus, textarea:focus').get(0)
}
@ -395,7 +395,7 @@ $(document).on('keydown mousedown', function(e) {
}
var used = false;
var input_focus = getInputFocusElement()
var input_focus = getFocusedTextInput()
if (input_focus) {
//User Editing Anything
@ -509,7 +509,7 @@ $(document).on('keydown mousedown', function(e) {
}
})
document.addEventListener('wheel', (e) => {
if (getInputFocusElement()) return;
if (getFocusedTextInput()) return;
let used = false;
Keybinds.actions.forEach(function(action) {
if (

View File

@ -871,13 +871,13 @@
"action.move_back.desc": "Move the selected cubes back relative to the current camera angle",
"action.fullscreen": "Fullscreen",
"action.fullscreen.desc": "Toggles fullscreen mode.",
"action.fullscreen.desc": "Toggles fullscreen mode",
"action.zoom_in": "Zoom In",
"action.zoom_in.desc": "Zoom in to scale up the interface.",
"action.zoom_in.desc": "Zoom in to scale up the interface",
"action.zoom_out": "Zoom Out",
"action.zoom_out.desc": "Zoom out to scale down the interface.",
"action.zoom_out.desc": "Zoom out to scale down the interface",
"action.zoom_reset": "Reset Zoom",
"action.zoom_reset.desc": "Reset zoom to the default 100%.",
"action.zoom_reset.desc": "Reset zoom to the default 100%",
"action.reset_interface": "Reset Interface",
"action.reset_interface.desc": "Reset size and positions of the GUI",
"action.toggle_wireframe": "Toggle Wireframe",
@ -977,8 +977,8 @@
"action.keyframe_interpolation.desc": "Select the keyframe interpolation mode",
"action.keyframe_interpolation.linear": "Linear",
"action.keyframe_interpolation.catmullrom": "Smooth",
"action.change_keyframe_file": "Select File",
"action.change_keyframe_file.desc": "Select an audio file to preview a sound effect.",
"action.change_keyframe_file": "Select Keyframe File",
"action.change_keyframe_file.desc": "Select an audio or particle file to preview an effect",
"action.reset_keyframe": "Reset Keyframe",
"action.reset_keyframe.desc": "Reset all values of the selected keyframes",
"action.resolve_keyframe_expressions": "Resolve Keyframe",