fix hover/drop highlight. more left menu tweaks
This commit is contained in:
parent
c0caa7016b
commit
0466d36f4d
4 changed files with 28 additions and 10 deletions
|
|
@ -286,8 +286,8 @@ let file = {
|
|||
|
||||
// return selection if models are invalid. can happen when called from
|
||||
// even bound to a button which delivers a PointEvent argument
|
||||
function fallback(models) {
|
||||
return Array.isArray(models) ? models : selection.models();
|
||||
function fallback(models, strict) {
|
||||
return Array.isArray(models) ? models : selection.models(strict);
|
||||
}
|
||||
|
||||
let tool = {
|
||||
|
|
@ -307,6 +307,10 @@ let tool = {
|
|||
});
|
||||
},
|
||||
|
||||
split(models) {
|
||||
models = fallback(models);
|
||||
},
|
||||
|
||||
duplicate() {
|
||||
for (let m of selection.models()) {
|
||||
m.duplicate();
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ function ui_build() {
|
|||
h.div([
|
||||
// create and bind file loading elements
|
||||
h.div({ _: "file", class: "head" }),
|
||||
h.div({ class: "vsep" }),
|
||||
// h.div({ class: "vsep" }),
|
||||
h.button({ _: 'import', onclick: file.import }, [
|
||||
h.input({
|
||||
id: "import", type: "file", class: ["hide"], multiple: true,
|
||||
|
|
@ -238,7 +238,7 @@ function ui_build() {
|
|||
]),
|
||||
h.div([
|
||||
h.div({ _: "view", class: "head" }),
|
||||
h.div({ class: "vsep" }),
|
||||
// h.div({ class: "vsep" }),
|
||||
h.button({ _: 'visible', onclick() { selection.visible({ toggle: true }) } }),
|
||||
h.button({ _: 'bounds', onclick() { selection.boundsBox({ toggle: true }) } }),
|
||||
h.button({ _: 'gridlines', onclick() { api.grid() } }),
|
||||
|
|
@ -247,14 +247,15 @@ function ui_build() {
|
|||
]),
|
||||
h.div([
|
||||
h.div({ _: "edit", class: "head" }),
|
||||
h.div({ class: "vsep" }),
|
||||
// h.div({ class: "vsep" }),
|
||||
h.button({ _: 'duplicate', onclick: tool.duplicate }),
|
||||
h.button({ _: 'merge', onclick: tool.merge }),
|
||||
h.button({ _: 'split', onclick: tool.split }),
|
||||
h.button({ _: 'invert', onclick: tool.invert }),
|
||||
]),
|
||||
h.div([
|
||||
h.div({ _: "fix", class: "head" }),
|
||||
h.div({ class: "vsep" }),
|
||||
// h.div({ class: "vsep" }),
|
||||
h.button({ _: 'analyze', onclick: tool.analyze }),
|
||||
h.button({ _: 'repair', onclick: tool.repair }),
|
||||
h.button({ _: 'clean', onclick: tool.clean }),
|
||||
|
|
|
|||
Loading…
Reference in a new issue