@aurigma/design-atoms-model
Version:
Design Atoms is a part of Customer's Canvas SDK which allows for manipulating individual design elements through your code.
56 lines • 2.14 kB
JavaScript
import { EventObject } from "../../EventObject";
export class BarcodePermissions {
constructor() {
this._allowChangeBarcodeType = true;
this._allowChangeBarcodeContent = true;
this._allowChangeBarcodeColor = true;
this.propertyChanged = new EventObject();
}
get allowChangeBarcodeType() {
return this._allowChangeBarcodeType;
}
set allowChangeBarcodeType(value) {
if (this._allowChangeBarcodeType === value)
return;
this._allowChangeBarcodeType = value;
this.propertyChanged.notify();
}
get allowChangeBarcodeContent() {
return this._allowChangeBarcodeContent;
}
set allowChangeBarcodeContent(value) {
if (this._allowChangeBarcodeContent === value)
return;
this._allowChangeBarcodeContent = value;
this.propertyChanged.fire();
}
get allowChangeBarcodeColor() {
return this._allowChangeBarcodeColor;
}
set allowChangeBarcodeColor(value) {
if (this._allowChangeBarcodeColor === value)
return;
this._allowChangeBarcodeColor = value;
this.propertyChanged.notify();
}
getSimplifiedObject() {
const result = {};
result["allowChangeBarcodeType"] = this.allowChangeBarcodeType;
result["allowChangeBarcodeContent"] = this.allowChangeBarcodeContent;
result["allowChangeBarcodeColor"] = this.allowChangeBarcodeColor;
return result;
}
clone() {
const clone = new BarcodePermissions();
clone.allowChangeBarcodeType = this.allowChangeBarcodeType;
clone.allowChangeBarcodeContent = this.allowChangeBarcodeContent;
clone.allowChangeBarcodeColor = this.allowChangeBarcodeColor;
return clone;
}
equals(p) {
return this.allowChangeBarcodeColor === p.allowChangeBarcodeColor &&
this.allowChangeBarcodeContent === p.allowChangeBarcodeContent &&
this.allowChangeBarcodeType === p.allowChangeBarcodeType;
}
}
//# sourceMappingURL=BarcodePermissions.js.map