39 lines
1.0 KiB
JavaScript
39 lines
1.0 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.Shadow = void 0;
|
|
const OptionsColor_1 = require("../OptionsColor");
|
|
class Shadow {
|
|
constructor() {
|
|
this.blur = 0;
|
|
this.color = new OptionsColor_1.OptionsColor();
|
|
this.enable = false;
|
|
this.offset = {
|
|
x: 0,
|
|
y: 0,
|
|
};
|
|
this.color.value = "#000";
|
|
}
|
|
load(data) {
|
|
if (!data) {
|
|
return;
|
|
}
|
|
if (data.blur !== undefined) {
|
|
this.blur = data.blur;
|
|
}
|
|
this.color = OptionsColor_1.OptionsColor.create(this.color, data.color);
|
|
if (data.enable !== undefined) {
|
|
this.enable = data.enable;
|
|
}
|
|
if (data.offset === undefined) {
|
|
return;
|
|
}
|
|
if (data.offset.x !== undefined) {
|
|
this.offset.x = data.offset.x;
|
|
}
|
|
if (data.offset.y !== undefined) {
|
|
this.offset.y = data.offset.y;
|
|
}
|
|
}
|
|
}
|
|
exports.Shadow = Shadow;
|