added but havent tested backwards compatibility

This commit is contained in:
2025-07-29 21:27:27 -04:00
parent 52f5f4b51b
commit 52f566012d
+29
View File
@@ -11,6 +11,13 @@
display: none;
}
.invertedX {
transform: scaleX(-1);
}
.invertedY {
transform: scaleY(-1);
}
/*
* CURSOR STUFF
body {
@@ -527,6 +534,8 @@
</div>
</div>
todo: recoloring links and then adding a new one resets the color, and something else. check the refreshing of containers, yo!
<br />also change add image to "add media" and add youtube iframe support
<br />also mirror images x/y?
</body>
<script>
@@ -1405,6 +1414,9 @@
* applies saved cosmetic customizations to container
*/
applySettings() {
// makes sure that any old themes will still load
this.ensureBackwardsCompatibility();
/** set options relevant to both image and text containers */
/** POSITION */
document.getElementById(this.id).style.top = this.y;
@@ -1711,6 +1723,23 @@
}
}
ensureBackwardsCompatibility() {
let currentSettings;
if (this.imageUrl == undefined) {
currentSettings = Object.keys(defaultTextContainerSettings);
}
else {
currentSettings = Object.keys(defaultImageContainerSettings);
}
for (let i = 0; i < currentSettings.length; i++) {
if (this.containerSettings[currentSettings[i]] == undefined) {
console.log("found missing option: ");
console.log(currentSettings[i]);
this.containerSettings[currentSettings[i]] = defaultTextContainerSettings[currentSettings[i]];
}
}
}
}