UNPKG

@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.

33 lines 1.05 kB
import { EventObject } from "../EventObject"; import { equals } from "../Utils/Utils"; export class ItemMask { constructor() { this._vectorMask = null; this._maskChangedEvent = new EventObject(); } get vectorMask() { return this._vectorMask; } set vectorMask(value) { this._vectorMask = value; this._maskChangedEvent.notify(this); } addMaskChanged(handler) { this._maskChangedEvent.add(handler); } removeMaskChanged(handler) { this._maskChangedEvent.remove(handler); } clone() { const clone = new ItemMask(); clone.vectorMask = this.vectorMask != null ? this.vectorMask.clone() : null; return clone; } equals(m) { return equals(this.vectorMask, m.vectorMask); } getSimplifiedObject() { const simplified = {}; simplified["vectorMask"] = this.vectorMask != null ? this.vectorMask.toString() : null; return simplified; } } //# sourceMappingURL=ItemMask.js.map