fixed for firefox

This commit is contained in:
Stewart Allen 2018-02-20 16:30:50 -05:00
commit 6d40421992
4 changed files with 26 additions and 6 deletions

View file

@ -746,9 +746,13 @@ self.kiri.license = exports.LICENSE;
} }
function showSlice(index, range, layer) { function showSlice(index, range, layer) {
return range ? if (range) {
(index <= layer && index > layer-range) : (index <= layer); return index <= layer && index > layer-range;
MODE === MODES.CAM ? (index >= layer) : (index <= layer); } else if (MODE === MODES.CAM) {
return index >= layer;
} else {
return index <= layer;
}
} }
/** /**

View file

@ -183,7 +183,6 @@ var gs_moto_ui = exports;
pop.setAttribute("class", "poptext flow-col"); pop.setAttribute("class", "poptext flow-col");
box.setAttribute("style", "position: relative"); box.setAttribute("style", "position: relative");
btn.appendChild(box);
box.appendChild(pop); box.appendChild(pop);
pop.appendChild(lbl); pop.appendChild(lbl);
pop.appendChild(txt); pop.appendChild(txt);
@ -195,6 +194,19 @@ var gs_moto_ui = exports;
btn.appendChild(DOC.createTextNode("edit")); btn.appendChild(DOC.createTextNode("edit"));
btn.onclick = function(ev) { btn.onclick = function(ev) {
btn.parentNode.appendChild(box);
btn.parentNode.onclick = function(ev) {
ev.stopPropagation();
if (ev.target === txt) return;
var showing = pop === lastPop;
hidePop();
if (!showing) {
pop.style.display = "flex";
lastPop = pop;
txt.focus();
}
};
ev.stopPropagation(); ev.stopPropagation();
if (ev.target === txt) return; if (ev.target === txt) return;
var showing = pop === lastPop; var showing = pop === lastPop;
@ -202,6 +214,7 @@ var gs_moto_ui = exports;
if (!showing) { if (!showing) {
pop.style.display = "flex"; pop.style.display = "flex";
lastPop = pop; lastPop = pop;
txt.focus();
} }
}; };
addModeControls(btn, opt); addModeControls(btn, opt);

View file

@ -848,10 +848,12 @@ const api = {
}, },
"filters-fdm": (req, res, next) => { "filters-fdm": (req, res, next) => {
res.setHeader("Content-Type", "application/javascript");
res.end(obj2string(filters_fdm)); res.end(obj2string(filters_fdm));
}, },
"filters-cam": (req, res, next) => { "filters-cam": (req, res, next) => {
res.setHeader("Content-Type", "application/javascript");
res.end(obj2string(filters_cam)); res.end(obj2string(filters_cam));
} }

View file

@ -567,7 +567,7 @@ button[import="1"] {
#layers { #layers {
display: none; display: none;
position: fixed; position: fixed;
bottom: 30px; bottom: 25px;
background-color: rgba(0,0,0,0.2); background-color: rgba(0,0,0,0.2);
border: 1px solid rgba(0,0,0,0.5); border: 1px solid rgba(0,0,0,0.5);
border-radius: 3px; border-radius: 3px;
@ -583,10 +583,11 @@ button[import="1"] {
.poptext { .poptext {
display: none; display: none;
position: absolute; position: absolute;
margin-left: 55px; margin-left: 30px;
border: 5px solid gray; border: 5px solid gray;
border-radius: 3px; border-radius: 3px;
transform: translate(0, -25%); transform: translate(0, -25%);
z-Index: 10000;
} }
.poptext textarea { .poptext textarea {
opacity: 0.95; opacity: 0.95;