add settings name hover/pop
This commit is contained in:
parent
f2b1674887
commit
777f118f0f
5 changed files with 39 additions and 8 deletions
|
|
@ -158,8 +158,6 @@
|
|||
if (KIRI.work.isSlicing()) KIRI.work.restart();
|
||||
// kill any poppers in compact mode
|
||||
UC.hidePoppers();
|
||||
// hide layers menu
|
||||
// UI.layers.style.display = 'none';
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
|
|
@ -1165,6 +1163,7 @@
|
|||
toolTaperTip: $('tool-ttip'),
|
||||
toolMetric: $('tool-metric'),
|
||||
|
||||
setNow: $('set-now'),
|
||||
setMenu: $('set-menu'),
|
||||
settings: $('settings'),
|
||||
settingsBody: $('settingsBody'),
|
||||
|
|
@ -1585,6 +1584,10 @@
|
|||
API.space.reload();
|
||||
};
|
||||
|
||||
$('set-top').onmouseover = () => {
|
||||
UC.hidePoppers();
|
||||
};
|
||||
|
||||
SPACE.addEventHandlers(self, [
|
||||
'keyup', keyUpHandler,
|
||||
'keydown', keyDownHandler,
|
||||
|
|
|
|||
|
|
@ -1725,22 +1725,32 @@
|
|||
let mode = getMode(),
|
||||
name = e ? e.target.getAttribute("load") : named || settings.cproc[mode],
|
||||
load = settings.sproc[mode][name];
|
||||
|
||||
if (!load) return;
|
||||
|
||||
// clone loaded process into settings
|
||||
settings.process = clone(load);
|
||||
// update process name
|
||||
settings.process.processName = name;
|
||||
// set currenet process name for this mode
|
||||
settings.cproc[mode] = name;
|
||||
|
||||
// associate named process with the current device
|
||||
// save named process with the current device
|
||||
settings.devproc[currentDeviceName()] = name;
|
||||
// update settings hover-pop with current process name
|
||||
UI.setNow.innerText = named;
|
||||
|
||||
// allow mode driver to take any necessary actions
|
||||
API.event.emit("settings.load", settings);
|
||||
|
||||
// FDM process settings overridden by device
|
||||
if (mode == "FDM") {
|
||||
settings.process.outputOriginCenter = (settings.device.originCenter || false);
|
||||
}
|
||||
// if (mode == "FDM") {
|
||||
// settings.process.outputOriginCenter = (settings.device.originCenter || false);
|
||||
// }
|
||||
|
||||
// update UI fields to reflect current settings
|
||||
updateFields();
|
||||
API.conf.update();
|
||||
|
||||
if (e) triggerSettingsEvent();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,6 +45,9 @@
|
|||
}
|
||||
|
||||
function init(kiri, api) {
|
||||
api.event.on("settings.load", (settings) => {
|
||||
settings.process.outputOriginCenter = (settings.device.originCenter || false);
|
||||
});
|
||||
api.event.on("settings.saved", (settings) => {
|
||||
let proc = settings.process;
|
||||
api.ui.fdmSupport.marker.style.display = proc.sliceSupportEnable ? 'flex' : 'none';
|
||||
|
|
|
|||
|
|
@ -831,6 +831,21 @@ th, tr, td {
|
|||
border-bottom-left-radius: 0;
|
||||
background-color: var(--bg-gray);
|
||||
}
|
||||
#set-top:hover #set-now {
|
||||
display: flex;
|
||||
}
|
||||
#set-now {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: -1px;
|
||||
right: 100%;
|
||||
padding: 5px;
|
||||
margin-right: 5px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 3px;
|
||||
background-color: white;
|
||||
z-index: 10;
|
||||
}
|
||||
#set-end {
|
||||
color: black;
|
||||
padding: 1px 10px 2px 2px;
|
||||
|
|
|
|||
|
|
@ -303,7 +303,7 @@
|
|||
</div>
|
||||
<div id="mid-rcol" class="col j-center noshow">
|
||||
<div id="set-menu" class="col">
|
||||
<div id="set-top" class="set-group"><a>settings</a></div>
|
||||
<div id="set-top" class="set-group"><a>settings</a><div id="set-now"></div></div>
|
||||
<div id="settings" class="col"></div>
|
||||
<div id="set-end" class="set-group"></div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue