Adding location pin, location input

This commit is contained in:
metacryst
2025-11-11 14:19:56 -06:00
parent fa67271ae8
commit 02648859a8
9 changed files with 80 additions and 8 deletions

View File

@@ -313,6 +313,22 @@ HTMLElement.prototype.padding = function(one, two, three = "px") {
return this
}
HTMLElement.prototype.paddingVertical = function(value, unit = "px") {
if ((typeof value !== 'number' && value !== "auto") || Number.isNaN(value))
throw new Error(`Invalid value: ${value}. Expected a number.`);
this.style.paddingTop = value + unit
this.style.paddingBottom = value + unit
return this
}
HTMLElement.prototype.paddingHorizontal = function(value, unit = "px") {
if ((typeof value !== 'number' && value !== "auto") || Number.isNaN(value))
throw new Error(`Invalid value: ${value}. Expected a number.`);
this.style.paddingRight = value + unit
this.style.paddingLeft = value + unit
return this
}
HTMLElement.prototype.margin = function(direction, value, unit = "px") {
if (!value) {
this.style.margin = direction;
@@ -503,6 +519,20 @@ HTMLElement.prototype.gap = function(value, unit = "px") {
return this
}
HTMLElement.prototype.backgroundImage = function (...values) {
const formatted = values
.map(v => {
if(v.includes("/") && !v.includes("gradient")) {
v = "url(" + v + ")"
}
return String(v).trim();
})
.join(", ");
this.style.backgroundImage = formatted;
return this;
};
/* Elements */
quill.setChildren = function(el, innerContent) {