UNPKG

@aurigma/design-atoms

Version:

Design Atoms is a part of Customer's Canvas SDK which allows for manipulating individual design elements through your code.

141 lines 5.14 kB
import { SelectionStyleConfig, HoverStyle, SpotlightStyle, RubberbandStyle } from "../Viewer"; var CanvasRendererStyle = /** @class */ (function () { function CanvasRendererStyle() { this.selection = new SelectionStyleConfig(); this.hover = new HoverStyle(); this.spotlight = new SpotlightStyle(); this.rubberband = new RubberbandStyle(); this._rotationGripColor = "rgba(0,0,255,0.2)"; this._rotationGripLineColor = "rgba(112,112,112,1)"; this._rotationGripLineLength = 12; this.selection.rotationGripSize = 24; this.selection.rotationGripSizeOnTouchDevice = 24; this.selection.resizeGripSize = 11; this.hover.textStyle = "normal 12px Roboto"; this.spotlight.textStyle = "normal 12px Roboto"; this.selection.color = "rgb(48,194,255)"; this.selection.textColor = "rgb(255, 255, 255)"; this.selection.width = 2; this.selection.resizeGripColor = "rgba(255,255,255,1)"; this.selection.resizeGripLineColor = "rgba(255,0,0,1)"; this.selection.resizeGripLineWidth = 1; this.hover.color = "rgba(255,0,0,1)"; this.hover.width = 2; this.rubberband.color = "rgba(0,0,0,1)"; this.rubberband.width = 1; this.rubberband.fillColor = "rgba(0,0,0,0)"; this.rubberband.dashPattern = [2, 2]; this.baselineColor = "rgb(48, 194, 255)"; } Object.defineProperty(CanvasRendererStyle.prototype, "canvasItemHoverEnabled", { get: function () { return this._canvasItemHoverEnabled; }, set: function (value) { this._canvasItemHoverEnabled = value; }, enumerable: true, configurable: true }); Object.defineProperty(CanvasRendererStyle.prototype, "baselineColor", { get: function () { return this._baselineColor; }, set: function (value) { this._baselineColor = value; }, enumerable: true, configurable: true }); Object.defineProperty(CanvasRendererStyle.prototype, "rotationGripSize", { get: function () { return this.selection.rotationGripSize; }, set: function (value) { this.selection.rotationGripSize = value; }, enumerable: true, configurable: true }); Object.defineProperty(CanvasRendererStyle.prototype, "resizeGripSize", { get: function () { return this.selection.resizeGripSize; }, set: function (value) { this.selection.resizeGripSize = value; }, enumerable: true, configurable: true }); Object.defineProperty(CanvasRendererStyle.prototype, "resizeGripColor", { get: function () { return this.selection.resizeGripLineColor; }, set: function (value) { this.selection.resizeGripLineColor = value; }, enumerable: true, configurable: true }); Object.defineProperty(CanvasRendererStyle.prototype, "rotationGripColor", { get: function () { return this._rotationGripColor; }, set: function (value) { this._rotationGripColor = value; }, enumerable: true, configurable: true }); Object.defineProperty(CanvasRendererStyle.prototype, "resizeGripLineColor", { get: function () { return this.selection.resizeGripLineColor; }, set: function (value) { this.selection.resizeGripLineColor = value; }, enumerable: true, configurable: true }); Object.defineProperty(CanvasRendererStyle.prototype, "rotationGripLineColor", { get: function () { return this._rotationGripLineColor; }, set: function (value) { this._rotationGripLineColor = value; }, enumerable: true, configurable: true }); Object.defineProperty(CanvasRendererStyle.prototype, "rotationGripLineLength", { get: function () { return this._rotationGripLineLength; }, set: function (value) { this._rotationGripLineLength = value; }, enumerable: true, configurable: true }); Object.defineProperty(CanvasRendererStyle.prototype, "highlightColor", { get: function () { return this.selection.resizeGripLineColor; }, enumerable: true, configurable: true }); Object.defineProperty(CanvasRendererStyle.prototype, "hoverColor", { get: function () { return this.hover.color; }, set: function (value) { this.hover.color = value; this.hover.textColor = value; }, enumerable: true, configurable: true }); return CanvasRendererStyle; }()); export { CanvasRendererStyle }; //# sourceMappingURL=CanvasRendererStyle.js.map