all container settings have been implemented! menu reorganization next
This commit is contained in:
+23
-20
@@ -2267,14 +2267,14 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse input
|
// parse input to extract name of font
|
||||||
fontCode = input;
|
fontCode = input;
|
||||||
fontName = fontCode.slice(fontCode.indexOf("family=") + 7);
|
fontName = fontCode.slice(fontCode.indexOf("family=") + 7);
|
||||||
if (fontName.indexOf("&") != -1) {
|
if (fontName.indexOf("&") != -1) {
|
||||||
fontName = fontName.slice(0, fontName.indexOf("&") + 1);
|
fontName = fontName.slice(0, fontName.indexOf("&") + 1);
|
||||||
}
|
}
|
||||||
fontName = fontName.slice(0, fontName.indexOf(":")).replaceAll("+", " ");
|
fontName = fontName.slice(0, fontName.indexOf(":")).replaceAll("+", " ");
|
||||||
// set new font
|
// set font on container
|
||||||
document.head.insertAdjacentHTML("beforeend", fontCode);
|
document.head.insertAdjacentHTML("beforeend", fontCode);
|
||||||
document.getElementById(containerId).style.fontFamily = fontName;
|
document.getElementById(containerId).style.fontFamily = fontName;
|
||||||
document.getElementById(containerId + "-settings-font-name").innerHTML = fontName;
|
document.getElementById(containerId + "-settings-font-name").innerHTML = fontName;
|
||||||
@@ -2283,35 +2283,38 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SHADOW
|
// SHADOW
|
||||||
function changeContainerShadow() {
|
function changeContainerShadow(valueChanged) {
|
||||||
containerSettings.shadowX =
|
let containerId = valueChanged.target.id.split("-")[0];
|
||||||
document.getElementById("shadowX").value == ""
|
let container = containerDataMap.get(containerId);
|
||||||
|
|
||||||
|
container.containerSettings.shadowX =
|
||||||
|
document.getElementById(containerId + "-settings-shadow-x").value == ""
|
||||||
? 0
|
? 0
|
||||||
: document.getElementById("shadowX").value;
|
: document.getElementById(containerId + "-settings-shadow-x").value;
|
||||||
containerSettings.shadowY =
|
container.containerSettings.shadowY =
|
||||||
document.getElementById("shadowY").value == ""
|
document.getElementById(containerId + "-settings-shadow-y").value == ""
|
||||||
? 0
|
? 0
|
||||||
: document.getElementById("shadowY").value;
|
: document.getElementById(containerId + "-settings-shadow-y").value;
|
||||||
containerSettings.shadowBlur =
|
container.containerSettings.shadowBlur =
|
||||||
document.getElementById("shadowBlur").value == ""
|
document.getElementById(containerId + "-settings-shadow-blur").value == ""
|
||||||
? 0
|
? 0
|
||||||
: document.getElementById("shadowBlur").value;
|
: document.getElementById(containerId + "-settings-shadow-blur").value;
|
||||||
containerSettings.shadowRgba = hexToRgba(
|
container.containerSettings.shadowRgba = hexToRgba(
|
||||||
document.getElementById("shadowColorPicker").value,
|
document.getElementById(containerId + "-settings-shadow-color").value,
|
||||||
document.getElementById("shadowAlpha").value
|
document.getElementById(containerId + "-settings-shadow-alpha").value
|
||||||
);
|
);
|
||||||
|
|
||||||
let shadow =
|
let shadow =
|
||||||
containerSettings.shadowX +
|
container.containerSettings.shadowX +
|
||||||
"px " +
|
"px " +
|
||||||
containerSettings.shadowY +
|
container.containerSettings.shadowY +
|
||||||
"px " +
|
"px " +
|
||||||
containerSettings.shadowBlur +
|
container.containerSettings.shadowBlur +
|
||||||
"px " +
|
"px " +
|
||||||
containerSettings.shadowRgba;
|
container.containerSettings.shadowRgba;
|
||||||
|
|
||||||
// set shadow
|
// set shadow
|
||||||
document.getElementById("mainContainer").style.boxShadow = shadow;
|
document.getElementById(containerId).style.boxShadow = shadow;
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************
|
/************************************
|
||||||
|
|||||||
Reference in New Issue
Block a user