54 lines
1.4 KiB
JavaScript
54 lines
1.4 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.DivEvent = void 0;
|
|
const Utils_1 = require("../../../../Utils/Utils");
|
|
class DivEvent {
|
|
constructor() {
|
|
this.selectors = [];
|
|
this.enable = false;
|
|
this.mode = [];
|
|
this.type = "circle";
|
|
}
|
|
get el() {
|
|
return this.elementId;
|
|
}
|
|
set el(value) {
|
|
this.elementId = value;
|
|
}
|
|
get elementId() {
|
|
return this.ids;
|
|
}
|
|
set elementId(value) {
|
|
this.ids = value;
|
|
}
|
|
get ids() {
|
|
return (0, Utils_1.executeOnSingleOrMultiple)(this.selectors, (t) => t.replace("#", ""));
|
|
}
|
|
set ids(value) {
|
|
this.selectors = (0, Utils_1.executeOnSingleOrMultiple)(value, (t) => `#${t}`);
|
|
}
|
|
load(data) {
|
|
var _a, _b;
|
|
if (!data) {
|
|
return;
|
|
}
|
|
const ids = (_b = (_a = data.ids) !== null && _a !== void 0 ? _a : data.elementId) !== null && _b !== void 0 ? _b : data.el;
|
|
if (ids !== undefined) {
|
|
this.ids = ids;
|
|
}
|
|
if (data.selectors !== undefined) {
|
|
this.selectors = data.selectors;
|
|
}
|
|
if (data.enable !== undefined) {
|
|
this.enable = data.enable;
|
|
}
|
|
if (data.mode !== undefined) {
|
|
this.mode = data.mode;
|
|
}
|
|
if (data.type !== undefined) {
|
|
this.type = data.type;
|
|
}
|
|
}
|
|
}
|
|
exports.DivEvent = DivEvent;
|