add settings name hover/pop

This commit is contained in:
Stewart Allen 2020-06-12 23:06:37 -04:00
commit 777f118f0f
5 changed files with 39 additions and 8 deletions

View file

@ -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,

View file

@ -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();
}