complete beta test ready compact mode
This commit is contained in:
parent
4fe7092318
commit
4b3d69fb5b
7 changed files with 118 additions and 46 deletions
|
|
@ -500,6 +500,7 @@ var gs_kiri_conf = exports;
|
||||||
},
|
},
|
||||||
controller:{
|
controller:{
|
||||||
view: null,
|
view: null,
|
||||||
|
compact: false,
|
||||||
zoomSpeed: 1.0,
|
zoomSpeed: 1.0,
|
||||||
reverseZoom: true,
|
reverseZoom: true,
|
||||||
showOrigin: false,
|
showOrigin: false,
|
||||||
|
|
|
||||||
|
|
@ -75,15 +75,22 @@ var gs_kiri_init = exports;
|
||||||
|
|
||||||
function booleanSave() {
|
function booleanSave() {
|
||||||
let current = settings();
|
let current = settings();
|
||||||
|
let isCompact = current.controller.compact;
|
||||||
current.controller.showOrigin = UI.showOrigin.checked;
|
current.controller.showOrigin = UI.showOrigin.checked;
|
||||||
current.controller.autoLayout = UI.autoLayout.checked;
|
current.controller.autoLayout = UI.autoLayout.checked;
|
||||||
current.controller.freeLayout = UI.freeLayout.checked;
|
current.controller.freeLayout = UI.freeLayout.checked;
|
||||||
current.controller.alignTop = UI.alignTop.checked;
|
current.controller.alignTop = UI.alignTop.checked;
|
||||||
current.controller.reverseZoom = UI.reverseZoom.checked;
|
current.controller.reverseZoom = UI.reverseZoom.checked;
|
||||||
|
current.controller.compact = UI.compact.checked;
|
||||||
SPACE.view.setZoom(current.controller.reverseZoom, current.controller.zoomSpeed);
|
SPACE.view.setZoom(current.controller.reverseZoom, current.controller.zoomSpeed);
|
||||||
platform.layout();
|
platform.layout();
|
||||||
platform.update_stock();
|
platform.update_stock();
|
||||||
API.conf.save();
|
API.conf.save();
|
||||||
|
// if compact mode changed, reload UI
|
||||||
|
if (isCompact !== current.controller.compact) {
|
||||||
|
UC.setDefaults(isCompact);
|
||||||
|
LOC.reload();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onLayerToggle() {
|
function onLayerToggle() {
|
||||||
|
|
@ -1065,6 +1072,9 @@ var gs_kiri_init = exports;
|
||||||
// MAIN INITIALIZATION FUNCTION
|
// MAIN INITIALIZATION FUNCTION
|
||||||
|
|
||||||
function init_one() {
|
function init_one() {
|
||||||
|
// ensure we have settings from last session
|
||||||
|
API.conf.restore();
|
||||||
|
|
||||||
let assets = $('assets'),
|
let assets = $('assets'),
|
||||||
control = $('control'),
|
control = $('control'),
|
||||||
container = $('container'),
|
container = $('container'),
|
||||||
|
|
@ -1084,6 +1094,8 @@ var gs_kiri_init = exports;
|
||||||
SPACE.platform.onMove(API.conf.save);
|
SPACE.platform.onMove(API.conf.save);
|
||||||
SPACE.platform.setRound(true);
|
SPACE.platform.setRound(true);
|
||||||
|
|
||||||
|
UC.setCompact(settings().controller.compact);
|
||||||
|
|
||||||
Object.assign(UI, {
|
Object.assign(UI, {
|
||||||
// from static HTML
|
// from static HTML
|
||||||
alert: {
|
alert: {
|
||||||
|
|
@ -1203,7 +1215,7 @@ var gs_kiri_init = exports;
|
||||||
UC.newButton(LANG.su_tool, showTools, {modes:CAM})
|
UC.newButton(LANG.su_tool, showTools, {modes:CAM})
|
||||||
],[
|
],[
|
||||||
UI.localButton =
|
UI.localButton =
|
||||||
UC.newButton(LANG.su_locl, API.show.local, {modes:FDM_CAM})
|
UC.newButton(LANG.su_locl, API.show.local, {modes:FDM_CAM, expert:true})
|
||||||
],[
|
],[
|
||||||
UI.helpButton =
|
UI.helpButton =
|
||||||
UC.newButton(LANG.su_help, API.help.show)
|
UC.newButton(LANG.su_help, API.help.show)
|
||||||
|
|
@ -1213,9 +1225,9 @@ var gs_kiri_init = exports;
|
||||||
wsFuncTable: UC.newTableRow([
|
wsFuncTable: UC.newTableRow([
|
||||||
[
|
[
|
||||||
UI.load =
|
UI.load =
|
||||||
UC.newButton(LANG.fn_impo, function() { API.event.import() }),
|
UC.newButton(LANG.fn_impo, function() { API.event.import() }, {class:"asym"}),
|
||||||
UI.import =
|
UI.import =
|
||||||
UC.newButton("+")
|
UC.newButton("+", undefined, {class:"asym"})
|
||||||
],[
|
],[
|
||||||
UI.modeArrange =
|
UI.modeArrange =
|
||||||
UC.newButton(LANG.fn_arra, platform.layout),
|
UC.newButton(LANG.fn_arra, platform.layout),
|
||||||
|
|
@ -1255,6 +1267,7 @@ var gs_kiri_init = exports;
|
||||||
]),
|
]),
|
||||||
|
|
||||||
layout: UC.newGroup(LANG.op_menu),
|
layout: UC.newGroup(LANG.op_menu),
|
||||||
|
compact: UC.newBoolean(LANG.op_comp_s, booleanSave, {title:LANG.op_comp_l}),
|
||||||
showOrigin: UC.newBoolean(LANG.op_show_s, booleanSave, {title:LANG.op_show_l}),
|
showOrigin: UC.newBoolean(LANG.op_show_s, booleanSave, {title:LANG.op_show_l}),
|
||||||
alignTop: UC.newBoolean(LANG.op_alig_s, booleanSave, {title:LANG.op_alig_l, modes:CAM}),
|
alignTop: UC.newBoolean(LANG.op_alig_s, booleanSave, {title:LANG.op_alig_l, modes:CAM}),
|
||||||
autoLayout: UC.newBoolean(LANG.op_auto_s, booleanSave, {title:LANG.op_auto_l}),
|
autoLayout: UC.newBoolean(LANG.op_auto_s, booleanSave, {title:LANG.op_auto_l}),
|
||||||
|
|
@ -1290,7 +1303,7 @@ var gs_kiri_init = exports;
|
||||||
UC.newButton(LANG.se_save, settingsSave)
|
UC.newButton(LANG.se_save, settingsSave)
|
||||||
],[
|
],[
|
||||||
UI.settingsExpert =
|
UI.settingsExpert =
|
||||||
UC.newButton(LANG.se_xprt, () => { UC.setExpert(true); SDB.setItem('expert', true) }, {modes:FDM, expert: false}),
|
UC.newButton(LANG.se_xprt, () => { UC.setExpert(true); SDB.setItem('expert', true) }, {modes:FDM, expert:false}),
|
||||||
UI.settingsExpert =
|
UI.settingsExpert =
|
||||||
UC.newButton(LANG.se_bsic, () => { UC.setExpert(false); SDB.removeItem('expert') }, {modes:FDM, expert:true})
|
UC.newButton(LANG.se_bsic, () => { UC.setExpert(false); SDB.removeItem('expert') }, {modes:FDM, expert:true})
|
||||||
]
|
]
|
||||||
|
|
@ -1597,6 +1610,8 @@ var gs_kiri_init = exports;
|
||||||
UI.freeLayout.checked = current.controller.freeLayout;
|
UI.freeLayout.checked = current.controller.freeLayout;
|
||||||
UI.autoLayout.checked = current.controller.autoLayout;
|
UI.autoLayout.checked = current.controller.autoLayout;
|
||||||
UI.alignTop.checked = current.controller.alignTop;
|
UI.alignTop.checked = current.controller.alignTop;
|
||||||
|
UI.reverseZoom.checked = current.controller.reverseZoom;
|
||||||
|
UI.compact.checked = current.controller.compact;
|
||||||
|
|
||||||
// load script extensions
|
// load script extensions
|
||||||
if (SETUP.s) SETUP.s.forEach(function(lib) {
|
if (SETUP.s) SETUP.s.forEach(function(lib) {
|
||||||
|
|
|
||||||
68
js/kiri.js
68
js/kiri.js
|
|
@ -137,10 +137,11 @@ self.kiri.copyright = exports.COPYRIGHT;
|
||||||
conf: {
|
conf: {
|
||||||
get: getSettings,
|
get: getSettings,
|
||||||
put: putSettings,
|
put: putSettings,
|
||||||
load: loadNamedSetting,
|
load: loadSettings,
|
||||||
save: saveSettings,
|
save: saveSettings,
|
||||||
show: showSettings,
|
show: showSettings,
|
||||||
update: updateSettings
|
update: updateSettings,
|
||||||
|
restore: restoreSettings
|
||||||
},
|
},
|
||||||
color,
|
color,
|
||||||
const: {
|
const: {
|
||||||
|
|
@ -640,7 +641,7 @@ self.kiri.copyright = exports.COPYRIGHT;
|
||||||
|
|
||||||
setViewMode(VIEWS.PREVIEW);
|
setViewMode(VIEWS.PREVIEW);
|
||||||
clearPrint();
|
clearPrint();
|
||||||
saveSettings();
|
API.conf.save();
|
||||||
|
|
||||||
if (MODE === MODES.CAM) {
|
if (MODE === MODES.CAM) {
|
||||||
setOpacity(color.cam_preview_opacity);
|
setOpacity(color.cam_preview_opacity);
|
||||||
|
|
@ -708,7 +709,7 @@ self.kiri.copyright = exports.COPYRIGHT;
|
||||||
setViewMode(VIEWS.SLICE);
|
setViewMode(VIEWS.SLICE);
|
||||||
|
|
||||||
clearPrint();
|
clearPrint();
|
||||||
saveSettings();
|
API.conf.save();
|
||||||
platform.deselect();
|
platform.deselect();
|
||||||
|
|
||||||
var firstMesh = true,
|
var firstMesh = true,
|
||||||
|
|
@ -1349,7 +1350,7 @@ self.kiri.copyright = exports.COPYRIGHT;
|
||||||
updateSettingsFromFields(settings.process);
|
updateSettingsFromFields(settings.process);
|
||||||
updateSettingsFromFields(settings.layers);
|
updateSettingsFromFields(settings.layers);
|
||||||
updateSettingsFromFields(settings.controller);
|
updateSettingsFromFields(settings.controller);
|
||||||
saveSettings();
|
API.conf.save();
|
||||||
platform.update_stock();
|
platform.update_stock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1374,7 +1375,7 @@ self.kiri.copyright = exports.COPYRIGHT;
|
||||||
cull(settings.cdev.FDM, filter.fdm.d);
|
cull(settings.cdev.FDM, filter.fdm.d);
|
||||||
cull(settings.cdev.CAM, filter.cam.d);
|
cull(settings.cdev.CAM, filter.cam.d);
|
||||||
// store camera view
|
// store camera view
|
||||||
var view = SPACE.view.save();
|
let view = SPACE.view.save();
|
||||||
if (view.left || view.up) settings.controller.view = view;
|
if (view.left || view.up) settings.controller.view = view;
|
||||||
SDB.setItem('ws-settings', JSON.stringify(settings));
|
SDB.setItem('ws-settings', JSON.stringify(settings));
|
||||||
}
|
}
|
||||||
|
|
@ -1414,7 +1415,7 @@ self.kiri.copyright = exports.COPYRIGHT;
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveWorkspace() {
|
function saveWorkspace() {
|
||||||
saveSettings();
|
API.conf.save();
|
||||||
var newWidgets = [],
|
var newWidgets = [],
|
||||||
oldWidgets = js2o(SDB.getItem('ws-widgets'), []);
|
oldWidgets = js2o(SDB.getItem('ws-widgets'), []);
|
||||||
forAllWidgets(function(widget) {
|
forAllWidgets(function(widget) {
|
||||||
|
|
@ -1429,12 +1430,9 @@ self.kiri.copyright = exports.COPYRIGHT;
|
||||||
alert2("workspace saved", 1);
|
alert2("workspace saved", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
function restoreWorkspace(ondone, skip_widget_load) {
|
function restoreSettings(save) {
|
||||||
var loaded = 0,
|
var newset = ls2o('ws-settings'),
|
||||||
toload = ls2o('ws-widgets',[]),
|
camera = ls2o('ws-camera');
|
||||||
newset = ls2o('ws-settings'),
|
|
||||||
camera = ls2o('ws-camera'),
|
|
||||||
position = true;
|
|
||||||
|
|
||||||
if (newset) {
|
if (newset) {
|
||||||
fillMissingSettings(settingsDefault, newset);
|
fillMissingSettings(settingsDefault, newset);
|
||||||
|
|
@ -1443,7 +1441,7 @@ self.kiri.copyright = exports.COPYRIGHT;
|
||||||
if (settings.controller.view) {
|
if (settings.controller.view) {
|
||||||
camera = settings.controller.view;
|
camera = settings.controller.view;
|
||||||
SDB.removeItem('ws-camera');
|
SDB.removeItem('ws-camera');
|
||||||
UI.reverseZoom.checked = settings.controller.reverseZoom;
|
// UI.reverseZoom.checked = settings.controller.reverseZoom;
|
||||||
}
|
}
|
||||||
// merge custom filters from localstorage into settings
|
// merge custom filters from localstorage into settings
|
||||||
localFilters.forEach(function(fname) {
|
localFilters.forEach(function(fname) {
|
||||||
|
|
@ -1453,9 +1451,19 @@ self.kiri.copyright = exports.COPYRIGHT;
|
||||||
});
|
});
|
||||||
SDB.removeItem(localFilterKey);
|
SDB.removeItem(localFilterKey);
|
||||||
// save updated settings
|
// save updated settings
|
||||||
saveSettings();
|
if (save) API.conf.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return {newset, camera};
|
||||||
|
}
|
||||||
|
|
||||||
|
function restoreWorkspace(ondone, skip_widget_load) {
|
||||||
|
let {newset, camera} = restoreSettings(true);
|
||||||
|
|
||||||
|
let loaded = 0,
|
||||||
|
toload = ls2o('ws-widgets',[]),
|
||||||
|
position = true;
|
||||||
|
|
||||||
updateFields();
|
updateFields();
|
||||||
platform.update_size();
|
platform.update_size();
|
||||||
platform.update_stock();
|
platform.update_stock();
|
||||||
|
|
@ -1538,11 +1546,11 @@ self.kiri.copyright = exports.COPYRIGHT;
|
||||||
|
|
||||||
function putSettings(newset) {
|
function putSettings(newset) {
|
||||||
settings = newset;
|
settings = newset;
|
||||||
saveSettings()
|
API.conf.save()
|
||||||
restoreWorkspace(null, true);
|
API.space.restore(null, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function editNamedSetting(e) {
|
function editSettings(e) {
|
||||||
var mode = getMode(),
|
var mode = getMode(),
|
||||||
name = e.target.getAttribute("name"),
|
name = e.target.getAttribute("name"),
|
||||||
load = settings.sproc[mode][name],
|
load = settings.sproc[mode][name],
|
||||||
|
|
@ -1552,16 +1560,16 @@ self.kiri.copyright = exports.COPYRIGHT;
|
||||||
try {
|
try {
|
||||||
settings.sproc[mode][name] = JSON.parse(edit);
|
settings.sproc[mode][name] = JSON.parse(edit);
|
||||||
if (name === settings.process.processName) {
|
if (name === settings.process.processName) {
|
||||||
loadNamedSetting(null, name);
|
API.conf.load(null, name);
|
||||||
}
|
}
|
||||||
saveSettings();
|
API.conf.save();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
alert('malformed settings object');
|
alert('malformed settings object');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadNamedSetting(e, named) {
|
function loadSettings(e, named) {
|
||||||
var mode = getMode(),
|
var mode = getMode(),
|
||||||
name = e ? e.target.getAttribute("load") : named || settings.cproc[mode],
|
name = e ? e.target.getAttribute("load") : named || settings.cproc[mode],
|
||||||
load = settings.sproc[mode][name];
|
load = settings.sproc[mode][name];
|
||||||
|
|
@ -1594,15 +1602,15 @@ self.kiri.copyright = exports.COPYRIGHT;
|
||||||
if (!named) {
|
if (!named) {
|
||||||
hideDialog();
|
hideDialog();
|
||||||
}
|
}
|
||||||
updateSettings();
|
API.conf.update();
|
||||||
if (e) triggerSettingsEvent();
|
if (e) triggerSettingsEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteNamedSetting(e) {
|
function deleteSettings(e) {
|
||||||
var name = e.target.getAttribute("del");
|
var name = e.target.getAttribute("del");
|
||||||
delete settings.sproc[getMode()][name];
|
delete settings.sproc[getMode()][name];
|
||||||
updateSettingsList();
|
updateSettingsList();
|
||||||
saveSettings();
|
API.conf.save();
|
||||||
triggerSettingsEvent();
|
triggerSettingsEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1620,7 +1628,7 @@ self.kiri.copyright = exports.COPYRIGHT;
|
||||||
name = sk;
|
name = sk;
|
||||||
|
|
||||||
load.setAttribute('load', sk);
|
load.setAttribute('load', sk);
|
||||||
load.onclick = loadNamedSetting;
|
load.onclick = API.conf.load;
|
||||||
load.appendChild(DOC.createTextNode(sk));
|
load.appendChild(DOC.createTextNode(sk));
|
||||||
if (sk == settings.process.processName) {
|
if (sk == settings.process.processName) {
|
||||||
load.setAttribute('class', 'selected')
|
load.setAttribute('class', 'selected')
|
||||||
|
|
@ -1628,13 +1636,13 @@ self.kiri.copyright = exports.COPYRIGHT;
|
||||||
|
|
||||||
del.setAttribute('del', sk);
|
del.setAttribute('del', sk);
|
||||||
del.setAttribute('title', "remove '"+sk+"'");
|
del.setAttribute('title', "remove '"+sk+"'");
|
||||||
del.onclick = deleteNamedSetting;
|
del.onclick = deleteSettings;
|
||||||
del.appendChild(DOC.createTextNode('x'));
|
del.appendChild(DOC.createTextNode('x'));
|
||||||
|
|
||||||
edit.innerHTML = '↑';
|
edit.innerHTML = '↑';
|
||||||
edit.setAttribute('name', sk);
|
edit.setAttribute('name', sk);
|
||||||
edit.setAttribute('title', 'edit');
|
edit.setAttribute('title', 'edit');
|
||||||
edit.onclick = editNamedSetting;
|
edit.onclick = editSettings;
|
||||||
|
|
||||||
row.setAttribute("class", "flow-row");
|
row.setAttribute("class", "flow-row");
|
||||||
row.appendChild(edit);
|
row.appendChild(edit);
|
||||||
|
|
@ -1795,8 +1803,8 @@ self.kiri.copyright = exports.COPYRIGHT;
|
||||||
MODE = MODES[mode];
|
MODE = MODES[mode];
|
||||||
// updates right-hand menu by enabling/disabling fields
|
// updates right-hand menu by enabling/disabling fields
|
||||||
UC.setMode(MODE);
|
UC.setMode(MODE);
|
||||||
loadNamedSetting();
|
API.conf.load();
|
||||||
saveSettings();
|
API.conf.save();
|
||||||
clearWidgetCache();
|
clearWidgetCache();
|
||||||
SPACE.update();
|
SPACE.update();
|
||||||
UI.modeFDM.setAttribute('class', MODE === MODES.FDM ? 'buton' : '');
|
UI.modeFDM.setAttribute('class', MODE === MODES.FDM ? 'buton' : '');
|
||||||
|
|
@ -1807,7 +1815,7 @@ self.kiri.copyright = exports.COPYRIGHT;
|
||||||
if (camStock) {
|
if (camStock) {
|
||||||
camStock.material.visible = settings.mode === 'CAM';
|
camStock.material.visible = settings.mode === 'CAM';
|
||||||
}
|
}
|
||||||
restoreWorkspace(null, true);
|
API.space.restore(null, true);
|
||||||
// if (MODE !== MODES.FDM) platform.layout();
|
// if (MODE !== MODES.FDM) platform.layout();
|
||||||
if (then) then();
|
if (then) then();
|
||||||
triggerSettingsEvent();
|
triggerSettingsEvent();
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
var exports = {
|
var exports = {
|
||||||
COPYRIGHT:"Copyright (C) Stewart Allen <sa@grid.space> - All Rights Reserved",
|
COPYRIGHT:"Copyright (C) Stewart Allen <sa@grid.space> - All Rights Reserved",
|
||||||
LICENSE:"See the license.md file included with the source distribution",
|
LICENSE:"See the license.md file included with the source distribution",
|
||||||
VERSION:"1.7.9"
|
VERSION:"1.8.0"
|
||||||
};
|
};
|
||||||
if (!module) var module = {};
|
if (!module) var module = {};
|
||||||
module.exports = exports;
|
module.exports = exports;
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,8 @@ var gs_moto_ui = exports;
|
||||||
DOC = SELF.document,
|
DOC = SELF.document,
|
||||||
prefix = "tab",
|
prefix = "tab",
|
||||||
NOMODE = "nomode",
|
NOMODE = "nomode",
|
||||||
compact = false;
|
compact = false,
|
||||||
|
exitimer = undefined;
|
||||||
|
|
||||||
SELF.$ = (SELF.$ || function (id) { return DOC.getElementById(id) } );
|
SELF.$ = (SELF.$ || function (id) { return DOC.getElementById(id) } );
|
||||||
|
|
||||||
|
|
@ -55,10 +56,26 @@ var gs_moto_ui = exports;
|
||||||
newBlank: newBlank,
|
newBlank: newBlank,
|
||||||
newGroup: newGroup,
|
newGroup: newGroup,
|
||||||
setGroup: setGroup,
|
setGroup: setGroup,
|
||||||
|
setCompact: setCompact,
|
||||||
|
setDefaults: setDefaults,
|
||||||
checkpoint,
|
checkpoint,
|
||||||
restore
|
restore
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function setDefaults(bool) {
|
||||||
|
Object.keys(localStorage).forEach(name => {
|
||||||
|
let namepre = `${prefix}-show-`;
|
||||||
|
if (name.indexOf(namepre) === 0) {
|
||||||
|
localStorage[name] = bool;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function setCompact(bool) {
|
||||||
|
compact = bool;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
function setMode(mode) {
|
function setMode(mode) {
|
||||||
if (compact) {
|
if (compact) {
|
||||||
$('control-left').classList.add('compact');
|
$('control-left').classList.add('compact');
|
||||||
|
|
@ -135,14 +152,21 @@ var gs_moto_ui = exports;
|
||||||
}
|
}
|
||||||
toggleGroup(label, dbkey);
|
toggleGroup(label, dbkey);
|
||||||
};
|
};
|
||||||
if (compact) row.onmouseenter = function(ev) {
|
|
||||||
if (ev.target !== a && ev.target !== row) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
showGroup(label);
|
|
||||||
};
|
|
||||||
|
|
||||||
if (compact) {
|
if (compact) {
|
||||||
|
row.onmouseenter = function(ev) {
|
||||||
|
if (ev.target !== a && ev.target !== row) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
clearTimeout(exitimer);
|
||||||
|
showGroup(label);
|
||||||
|
};
|
||||||
|
row.onmouseleave = function(ev) {
|
||||||
|
if (ev.target !== a && ev.target !== row) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
clearTimeout(exitimer);
|
||||||
|
exitimer = setTimeout(showGroup, 1000);
|
||||||
|
};
|
||||||
addTo._group = label;
|
addTo._group = label;
|
||||||
addModeControls(addTo, options);
|
addModeControls(addTo, options);
|
||||||
lastGroup.push(addTo);
|
lastGroup.push(addTo);
|
||||||
|
|
@ -483,10 +507,17 @@ var gs_moto_ui = exports;
|
||||||
function newButton(label, action, options) {
|
function newButton(label, action, options) {
|
||||||
let b = DOC.createElement('button'),
|
let b = DOC.createElement('button'),
|
||||||
t = DOC.createTextNode(label);
|
t = DOC.createTextNode(label);
|
||||||
|
|
||||||
b.appendChild(t);
|
b.appendChild(t);
|
||||||
b.onclick = function() { action() };
|
b.onclick = function() { action() };
|
||||||
|
|
||||||
|
if (options && options.class) {
|
||||||
|
b.classList.add(options.class);
|
||||||
|
}
|
||||||
|
|
||||||
addModeControls(b, options);
|
addModeControls(b, options);
|
||||||
addId(b, options);
|
addId(b, options);
|
||||||
|
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,8 @@ kiri.lang['en-us'] = {
|
||||||
|
|
||||||
// OPTIONS
|
// OPTIONS
|
||||||
op_menu: "options",
|
op_menu: "options",
|
||||||
|
op_comp_s: "compact",
|
||||||
|
op_comp_l: "compact user interface",
|
||||||
op_show_s: "show origin",
|
op_show_s: "show origin",
|
||||||
op_show_l: "show device or process origin",
|
op_show_l: "show device or process origin",
|
||||||
op_alig_s: "align top",
|
op_alig_s: "align top",
|
||||||
|
|
|
||||||
|
|
@ -104,10 +104,12 @@ th, tr, td, span, div, label, button {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
margin-bottom: 3px;
|
margin-bottom: 3px;
|
||||||
padding: 3px 2px 2px 3px;
|
padding: 3px 2px 2px 3px;
|
||||||
text-align: center;
|
|
||||||
text-transform: uppercase;
|
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.grouphead > a {
|
||||||
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
.grouphead:hover {
|
.grouphead:hover {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
|
|
@ -208,7 +210,7 @@ th, tr, td, span, div, label, button {
|
||||||
margin-bottom: 1px !important;
|
margin-bottom: 1px !important;
|
||||||
margin-right: 2px !important;
|
margin-right: 2px !important;
|
||||||
}
|
}
|
||||||
.control > div > div {
|
.control .flow-row {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
@ -282,6 +284,19 @@ th, tr, td, span, div, label, button {
|
||||||
border: 0 !important;
|
border: 0 !important;
|
||||||
background-color: rgba(255,255,255,0.5) !important;
|
background-color: rgba(255,255,255,0.5) !important;
|
||||||
}
|
}
|
||||||
|
.compact .grouphead {
|
||||||
|
padding: 5px !important;
|
||||||
|
background-color: rgba(170,221,255,0.25);
|
||||||
|
}
|
||||||
|
.compact .grouphead:hover {
|
||||||
|
background-color: rgba(170,221,255,0.9);
|
||||||
|
}
|
||||||
|
.compact .grouphead a {
|
||||||
|
margin: 5px !important;
|
||||||
|
}
|
||||||
|
.compact .asym {
|
||||||
|
width: auto !important;
|
||||||
|
}
|
||||||
#control-left::-webkit-scrollbar, #control-right::-webkit-scrollbar {
|
#control-left::-webkit-scrollbar, #control-right::-webkit-scrollbar {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue