diff --git a/src/kiri/init.js b/src/kiri/init.js index 3367a01f..105024a6 100644 --- a/src/kiri/init.js +++ b/src/kiri/init.js @@ -1509,6 +1509,7 @@ ltfile: $('lt-file'), ltview: $('lt-view'), ltact: $('act-slice'), + edit: $('lt-tools'), rotate: $('lt-rotate'), scale: $('lt-scale'), nozzle: $('lt-nozzle'), @@ -2229,6 +2230,7 @@ UC.hoverPop(UI.ltview, { group: hpops, target: $('pop-view') }); UC.hoverPop(UI.ltact, { group: hpops, target: $('pop-slice') }); UC.hoverPop(UI.render, { group: hpops, target: $('pop-render'), sticky: false }); + UC.hoverPop(UI.edit, { group: hpops, target: $('pop-tools'), sticky: false }); UC.hoverPop(UI.rotate, { group: hpops, target: $('pop-rotate'), sticky: true }); UC.hoverPop(UI.scale, { group: hpops, target: $('pop-scale'), sticky: true }); UC.hoverPop(UI.nozzle, { group: hpops, target: $('pop-nozzle'), sticky: true }); @@ -2620,6 +2622,7 @@ // update static html elements with language overrides UI.lang = function() { + // lk attribute causes inner text to be replaced with lang value for (let el of [...DOC.querySelectorAll("[lk]")]) { let key = el.getAttribute('lk'); let val = LANG[key]; @@ -2629,6 +2632,16 @@ console.log({missing_ln: key}); } } + // lkt attribute causes a title attribute to be set from lang value + for (let el of [...DOC.querySelectorAll("[lkt]")]) { + let key = el.getAttribute('lkt'); + let val = LANG[key]; + if (val) { + el.setAttribute("title", val); + } else { + console.log({missing_ln: key}); + } + } }; // if a language needs to load, the script is injected and loaded diff --git a/web/kiri/index.css b/web/kiri/index.css index 8ee6d88a..9036c56a 100644 --- a/web/kiri/index.css +++ b/web/kiri/index.css @@ -429,6 +429,12 @@ th, tr, td, label { background-image: var(--gradbar); } +#float-tools { + display: none; + position: absolute; + left: 100%; +} + #lt-top { height: 10px; border-top-right-radius: 10px; diff --git a/web/kiri/index.html b/web/kiri/index.html index f4a042bb..65af0515 100644 --- a/web/kiri/index.html +++ b/web/kiri/index.html @@ -77,7 +77,72 @@
- +