mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-11-27 04:21:46 +08:00
Improve apply display preset menu
Fix draggable recent model thumbnails
This commit is contained in:
parent
28dba208d9
commit
bb749a20f8
@ -563,6 +563,7 @@
|
||||
}
|
||||
.texture_drag_helper {
|
||||
z-index: 100;
|
||||
border: 2px solid var(--color-accent);
|
||||
box-shadow: 0 0 16px black;
|
||||
}
|
||||
.icon_placeholder {
|
||||
|
@ -108,7 +108,7 @@
|
||||
width: 180px;
|
||||
height: 100px;
|
||||
margin: auto;
|
||||
cursor: pointer;
|
||||
pointer-events: none;
|
||||
}
|
||||
#start_screen .recent_project.thumbnail:hover {
|
||||
background-color: var(--color-accent);
|
||||
|
@ -1610,7 +1610,7 @@ BARS.defineActions(function() {
|
||||
category: 'display',
|
||||
condition: () => display_mode,
|
||||
click: function (e) {
|
||||
new Menu(this.children()).open(e.target)
|
||||
new Menu('apply_display_preset', this.children(), {searchable: true}).open(e.target);
|
||||
},
|
||||
children: function() {
|
||||
var presets = []
|
||||
@ -1627,6 +1627,9 @@ BARS.defineActions(function() {
|
||||
presets.push({
|
||||
icon: icon,
|
||||
name: p.id ? tl('display.preset.'+p.id) : p.name,
|
||||
click() {
|
||||
DisplayMode.applyPreset(p)
|
||||
},
|
||||
children: [
|
||||
{name: 'action.apply_display_preset.here', icon: 'done', click() {
|
||||
DisplayMode.applyPreset(p)
|
||||
|
@ -414,19 +414,16 @@ document.body.ondrop = function(event) {
|
||||
forDragHandlers(event, function(handler, el) {
|
||||
var fileNames = event.dataTransfer.files
|
||||
|
||||
var input = this;
|
||||
var results = [];
|
||||
var result_count = 0;
|
||||
var i = 0;
|
||||
var errant;
|
||||
var paths = []
|
||||
var paths = [];
|
||||
if (isApp) {
|
||||
for (var file of fileNames) {
|
||||
paths.push(file.path)
|
||||
if (file.path) paths.push(file.path)
|
||||
}
|
||||
} else {
|
||||
paths = fileNames
|
||||
}
|
||||
if (!paths.length) return;
|
||||
|
||||
Blockbench.read(paths, handler, (content) => {
|
||||
handler.cb(content, event)
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user