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) {
return range ?
(index <= layer && index > layer-range) : (index <= layer);
MODE === MODES.CAM ? (index >= layer) : (index <= layer);
if (range) {
return index <= layer && index > layer-range;
} 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");
box.setAttribute("style", "position: relative");
btn.appendChild(box);
box.appendChild(pop);
pop.appendChild(lbl);
pop.appendChild(txt);
@ -195,6 +194,19 @@ var gs_moto_ui = exports;
btn.appendChild(DOC.createTextNode("edit"));
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();
if (ev.target === txt) return;
var showing = pop === lastPop;
@ -202,6 +214,7 @@ var gs_moto_ui = exports;
if (!showing) {
pop.style.display = "flex";
lastPop = pop;
txt.focus();
}
};
addModeControls(btn, opt);

View file

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

View file

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