mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-11-27 04:21:46 +08:00
Fix numeric inputs not allowing negative numbers
Fix clipping on app updated icon
This commit is contained in:
parent
bae176fa72
commit
50a1936c2c
@ -621,8 +621,8 @@
|
||||
#mode_selector li.selected {
|
||||
border-bottom: 3px solid var(--color-accent);
|
||||
}
|
||||
#update_menu {
|
||||
padding-top: 2px;
|
||||
#update_menu .tool > .icon {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
/* Tab Bar */
|
||||
|
@ -670,7 +670,7 @@ class NumSlider extends Widget {
|
||||
|
||||
var scope = this;
|
||||
this.node = Interface.createElement('div', {class: 'tool wide widget nslide_tool', toolbar_item: this.id}, [
|
||||
Interface.createElement('div', {class: 'nslide tab_target', inputmode: 'decimal', 'n-action': this.id})
|
||||
Interface.createElement('div', {class: 'nslide tab_target', inputmode: this.settings?.min >= 0 ? 'decimal' : '', 'n-action': this.id})
|
||||
])
|
||||
this.jq_outer = $(this.node)
|
||||
this.jq_inner = this.jq_outer.find('.nslide');
|
||||
|
@ -789,7 +789,7 @@ Interface.CustomElements.SelectInput = function(id, data) {
|
||||
this.set = setKey;
|
||||
}
|
||||
Interface.CustomElements.NumericInput = function(id, data) {
|
||||
let input = Interface.createElement('input', {id, class: 'dark_bordered focusable_input', value: data.value || 0, inputmode: 'decimal'});
|
||||
let input = Interface.createElement('input', {id, class: 'dark_bordered focusable_input', value: data.value || 0, inputmode: data.min >= 0 ? 'decimal' : ''});
|
||||
let slider = Interface.createElement('div', {class: 'tool numeric_input_slider'}, Blockbench.getIconNode('code'));
|
||||
this.node = Interface.createElement('div', {class: 'numeric_input'}, [
|
||||
input, slider
|
||||
|
@ -131,7 +131,7 @@ Vue.component('numeric-input', {
|
||||
},
|
||||
template: `
|
||||
<div class="numeric_input">
|
||||
<input class="dark_bordered focusable_input" :value="string_value" @input="change($event.target.value)" inputmode="decimal" lang="en" @focusout="resolve($event)" @dblclick="resolve($event)">
|
||||
<input class="dark_bordered focusable_input" :value="string_value" @input="change($event.target.value)" :inputmode="min >= 0 ? 'decimal' : ''" lang="en" @focusout="resolve($event)" @dblclick="resolve($event)">
|
||||
<div class="tool numeric_input_slider" @mousedown="slide($event)" @touchstart="slide($event)"><i class="material-icons">code</i></div>
|
||||
</div>
|
||||
`,
|
||||
|
Loading…
Reference in New Issue
Block a user