mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-11-21 01:13:37 +08:00
Merge pull request #2071 from Ampflower/pr/compatibility
This commit is contained in:
commit
f28e6d680a
@ -1527,7 +1527,7 @@ Interface.definePanels(() => {
|
|||||||
<div id="animation_controllers_wrapper"
|
<div id="animation_controllers_wrapper"
|
||||||
:class="{connecting_controllers: connecting}"
|
:class="{connecting_controllers: connecting}"
|
||||||
:style="{zoom: zoom, '--blend-transition': controller && controller.last_state ? controller.last_state.blend_transition + 's' : 0}"
|
:style="{zoom: zoom, '--blend-transition': controller && controller.last_state ? controller.last_state.blend_transition + 's' : 0}"
|
||||||
@click="deselect($event)" @mousewheel="onMouseWheel($event)"
|
@click="deselect($event)" @wheel="onMouseWheel($event)"
|
||||||
>
|
>
|
||||||
|
|
||||||
<div id="animation_controllers_pickwhip_anchor" style="height: 0px; position: relative;">
|
<div id="animation_controllers_pickwhip_anchor" style="height: 0px; position: relative;">
|
||||||
|
@ -1173,7 +1173,7 @@ class BarSelect extends Widget {
|
|||||||
if (typeof data.onChange === 'function') {
|
if (typeof data.onChange === 'function') {
|
||||||
this.onChange = data.onChange
|
this.onChange = data.onChange
|
||||||
}
|
}
|
||||||
$(this.node).on('mousewheel', event => {
|
$(this.node).on('wheel', event => {
|
||||||
scope.trigger(event.originalEvent);
|
scope.trigger(event.originalEvent);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -540,7 +540,7 @@ function setupInterface() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Scrolling
|
//Scrolling
|
||||||
$('input[type="range"]').on('mousewheel', function () {
|
$('input[type="range"]').on('wheel', function () {
|
||||||
var obj = $(event.target)
|
var obj = $(event.target)
|
||||||
var factor = event.deltaY > 0 ? -1 : 1
|
var factor = event.deltaY > 0 ? -1 : 1
|
||||||
var val = parseFloat(obj.val()) + parseFloat(obj.attr('step')) * factor
|
var val = parseFloat(obj.val()) + parseFloat(obj.attr('step')) * factor
|
||||||
|
@ -216,7 +216,7 @@ class Keybind {
|
|||||||
document.removeEventListener('keyup', onActivate)
|
document.removeEventListener('keyup', onActivate)
|
||||||
document.removeEventListener('keydown', onActivateDown)
|
document.removeEventListener('keydown', onActivateDown)
|
||||||
overlay.off('mousedown', onActivate)
|
overlay.off('mousedown', onActivate)
|
||||||
overlay.off('mousewheel', onActivate)
|
overlay.off('wheel', onActivate)
|
||||||
overlay.off('keydown keypress keyup click click dblclick mouseup mousewheel', preventDefault)
|
overlay.off('keydown keypress keyup click click dblclick mouseup mousewheel', preventDefault)
|
||||||
if (event instanceof KeyboardEvent == false && event.target && event.target.tagName === 'BUTTON') return;
|
if (event instanceof KeyboardEvent == false && event.target && event.target.tagName === 'BUTTON') return;
|
||||||
|
|
||||||
@ -247,7 +247,7 @@ class Keybind {
|
|||||||
document.addEventListener('keyup', onActivate)
|
document.addEventListener('keyup', onActivate)
|
||||||
document.addEventListener('keydown', onActivateDown)
|
document.addEventListener('keydown', onActivateDown)
|
||||||
overlay.on('mousedown', onActivate)
|
overlay.on('mousedown', onActivate)
|
||||||
overlay.on('mousewheel', onActivate)
|
overlay.on('wheel', onActivate)
|
||||||
|
|
||||||
overlay.on('keydown keypress keyup click click dblclick mouseup mousewheel', preventDefault)
|
overlay.on('keydown keypress keyup click click dblclick mouseup mousewheel', preventDefault)
|
||||||
return this;
|
return this;
|
||||||
@ -880,6 +880,10 @@ $(document).keyup(function(e) {
|
|||||||
if (Pressing.alt && ActionControl.open) {
|
if (Pressing.alt && ActionControl.open) {
|
||||||
ActionControl.vue.$forceUpdate()
|
ActionControl.vue.$forceUpdate()
|
||||||
}
|
}
|
||||||
|
// Firefox-specific fix for suppressing the menu bar
|
||||||
|
if(e.which == 18) {
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
if (e.which === 18 && Toolbox.original && Toolbox.original.alt_tool) {
|
if (e.which === 18 && Toolbox.original && Toolbox.original.alt_tool) {
|
||||||
Toolbox.original.select()
|
Toolbox.original.select()
|
||||||
delete Toolbox.original;
|
delete Toolbox.original;
|
||||||
|
@ -343,7 +343,7 @@ Interface.definePanels(() => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div v-show="open_tab == 'picker' || open_tab == 'both'" @mousewheel="onMouseWheel($event)">
|
<div v-show="open_tab == 'picker' || open_tab == 'both'" @wheel="onMouseWheel($event)">
|
||||||
<div v-show="picker_type == 'box'" ref="square_picker" :style="{maxWidth: width + 'px'}">
|
<div v-show="picker_type == 'box'" ref="square_picker" :style="{maxWidth: width + 'px'}">
|
||||||
<input id="main_colorpicker">
|
<input id="main_colorpicker">
|
||||||
</div>
|
</div>
|
||||||
@ -444,7 +444,7 @@ Interface.definePanels(() => {
|
|||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#color_history').on('mousewheel', function(e) {
|
$('#color_history').on('wheel', function(e) {
|
||||||
var delta = (e.originalEvent.deltaY < 0 ? -90 : 90);
|
var delta = (e.originalEvent.deltaY < 0 ? -90 : 90);
|
||||||
this.scrollLeft += delta;
|
this.scrollLeft += delta;
|
||||||
})
|
})
|
||||||
|
@ -3705,7 +3705,7 @@ Interface.definePanels(function() {
|
|||||||
@contextmenu="contextMenu($event)"
|
@contextmenu="contextMenu($event)"
|
||||||
@mousedown="onMouseDown($event)"
|
@mousedown="onMouseDown($event)"
|
||||||
@touchstart="onMouseDown($event)"
|
@touchstart="onMouseDown($event)"
|
||||||
@mousewheel="onMouseWheel($event)"
|
@wheel="onMouseWheel($event)"
|
||||||
@mousemove="updateMouseCoords($event)"
|
@mousemove="updateMouseCoords($event)"
|
||||||
@mouseleave="onMouseLeave($event)"
|
@mouseleave="onMouseLeave($event)"
|
||||||
class="checkerboard_target"
|
class="checkerboard_target"
|
||||||
|
Loading…
Reference in New Issue
Block a user