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.

95 lines 3.32 kB
import { RubberbandStyle, SpotlightStyle, HoverStyle, SelectionStyleConfig } from "../Viewer/CanvasStyle"; export class CanvasRendererStyle { constructor() { 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)"; } get canvasItemHoverEnabled() { return this._canvasItemHoverEnabled; } set canvasItemHoverEnabled(value) { this._canvasItemHoverEnabled = value; } get baselineColor() { return this._baselineColor; } set baselineColor(value) { this._baselineColor = value; } get rotationGripSize() { return this.selection.rotationGripSize; } set rotationGripSize(value) { this.selection.rotationGripSize = value; } get resizeGripSize() { return this.selection.resizeGripSize; } set resizeGripSize(value) { this.selection.resizeGripSize = value; } get resizeGripColor() { return this.selection.resizeGripLineColor; } set resizeGripColor(value) { this.selection.resizeGripLineColor = value; } get rotationGripColor() { return this._rotationGripColor; } set rotationGripColor(value) { this._rotationGripColor = value; } get resizeGripLineColor() { return this.selection.resizeGripLineColor; } set resizeGripLineColor(value) { this.selection.resizeGripLineColor = value; } get rotationGripLineColor() { return this._rotationGripLineColor; } set rotationGripLineColor(value) { this._rotationGripLineColor = value; } get rotationGripLineLength() { return this._rotationGripLineLength; } set rotationGripLineLength(value) { this._rotationGripLineLength = value; } get highlightColor() { return this.selection.resizeGripLineColor; } get hoverColor() { return this.hover.color; } set hoverColor(value) { this.hover.color = value; this.hover.textColor = value; } } //# sourceMappingURL=CanvasRendererStyle.js.map