@inweb/markup 26.12.0 → 26.12.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"markup.module.js","sources":["../src/markup/WorldTransform.ts","../src/markup/Konva/MarkupColor.ts","../src/markup/Konva/KonvaLine.ts","../src/markup/Konva/KonvaText.ts","../src/markup/Konva/KonvaRectangle.ts","../src/markup/Utils.ts","../src/markup/Konva/KonvaEllipse.ts","../src/markup/Konva/KonvaArrow.ts","../src/markup/Konva/KonvaImage.ts","../src/markup/Konva/KonvaCloud.ts","../src/markup/Konva/KonvaMarkup.ts"],"sourcesContent":["///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IWorldTransform } from \"./IWorldTransform\";\n\nexport class WorldTransform implements IWorldTransform {\n screenToWorld(position: { x: number; y: number }): { x: number; y: number; z: number } {\n return { x: position.x, y: position.y, z: 0 };\n }\n\n worldToScreen(position: { x: number; y: number; z: number }): { x: number; y: number } {\n return { x: position.x, y: position.y };\n }\n\n getScale(): { x: number; y: number; z: number } {\n return { x: 1, y: 1, z: 1 };\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\n/**\n * Defines the markup color helper object.\n */\nexport class MarkupColor {\n public R: number;\n public G: number;\n public B: number;\n public HEX: string;\n\n /**\n * Creates an instance of the color.\n *\n * @param r - The `red` component of the color, as a number between 0 and 255.\n * @param g - The `green` component of the color, as a number between 0 and 255.\n * @param b - The `blue` component of the color, as a number between 0 and 255.\n */\n constructor(r: number, g: number, b: number) {\n this.setColor(r, g, b);\n }\n\n /**\n * Returns the color as a string in hexadecimal color syntax `#RGB` using its primary color components\n * (red, green, blue) written as hexadecimal numbers.\n */\n public asHex(): string {\n return \"#\" + this.HEX;\n }\n\n /**\n * Returns the color as an {r, g, b} object.\n */\n public asRGB(): { r: number; g: number; b: number } {\n return { r: this.R, g: this.G, b: this.B };\n }\n\n /**\n * Sets the color.\n *\n * @param r - The `red` component of the color, as a number between 0 and 255.\n * @param g - The `green` component of the color, as a number between 0 and 255.\n * @param b - The `blue` component of the color, as a number between 0 and 255.\n */\n public setColor(r: number, g: number, b: number): void {\n this.R = r;\n this.G = g;\n this.B = b;\n this.HEX = this.rgbToHex(r, g, b);\n }\n\n private rgbToHex(r: number, g: number, b: number): string {\n const valueToHex = (c: number) => {\n const hex = c.toString(16);\n return hex === \"0\" ? \"00\" : hex;\n };\n\n return valueToHex(r) + valueToHex(g) + valueToHex(b);\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport Konva from \"konva\";\nimport { IMarkupLine, IMarkupLineParams, MarkupLineType } from \"../IMarkupLine\";\nimport { IWorldTransform } from \"../IWorldTransform\";\nimport { WorldTransform } from \"../WorldTransform\";\n\nconst LineTypeSpecs = new Map<string, number[]>([\n [\"solid\", []],\n [\"dot\", [30, 30, 0.001, 30]],\n [\"dash\", [30, 30]],\n]);\n\nexport class KonvaLine implements IMarkupLine {\n private _ref: Konva.Line;\n private _worldTransformer: IWorldTransform;\n\n constructor(params: IMarkupLineParams, ref = null, worldTransformer = new WorldTransform()) {\n this._worldTransformer = worldTransformer;\n\n if (ref) {\n this._ref = ref;\n let wcsPoints = this._ref.getAttr(\"wcsPoints\");\n if (!wcsPoints) {\n wcsPoints = [];\n const points = this._ref.points();\n let wcsPoint;\n for (let i = 0; i < points.length; i += 2) {\n wcsPoint = this._worldTransformer.screenToWorld({ x: points[i], y: points[i + 1] });\n wcsPoints.push({ x: wcsPoint.x, y: wcsPoint.y, z: wcsPoint.z });\n }\n this._ref.setAttr(\"wcsPoints\", wcsPoints);\n }\n return;\n }\n\n if (!params) params = {};\n if (!params.points)\n params.points = [\n { x: 0, y: 0 },\n { x: 100, y: 100 },\n ];\n\n const konvaPoints = [];\n const wcsPoints = [];\n params.points.forEach((point) => {\n konvaPoints.push(point.x, point.y);\n const wcsPoint = this._worldTransformer.screenToWorld({ x: point.x, y: point.y });\n wcsPoints.push({ x: wcsPoint.x, y: wcsPoint.y, z: wcsPoint.z });\n });\n\n this._ref = new Konva.Line({\n stroke: params.color ?? \"#ff0000\",\n strokeWidth: params.width ?? 4,\n globalCompositeOperation: \"source-over\",\n lineCap: \"round\",\n lineJoin: \"round\",\n points: konvaPoints,\n draggable: true,\n strokeScaleEnabled: false,\n dash: LineTypeSpecs.get(params.type) || [],\n });\n\n this._ref.setAttr(\"wcsPoints\", wcsPoints);\n\n this._ref.on(\"transform\", (e) => {\n const attrs = e.target.attrs;\n\n if (attrs.rotation !== this._ref.rotation()) this._ref.rotation(attrs.rotation);\n });\n\n this._ref.on(\"transformend\", () => {\n const absoluteTransform = this._ref.getAbsoluteTransform();\n\n const wcsPoints = [];\n const points = this._ref.points();\n let wcsPoint;\n for (let i = 0; i < points.length; i += 2) {\n const position = absoluteTransform.point({ x: points[i], y: points[i + 1] });\n wcsPoint = this._worldTransformer.screenToWorld({ x: position.x, y: position.y });\n wcsPoints.push({ x: wcsPoint.x, y: wcsPoint.y, z: wcsPoint.z });\n }\n this._ref.setAttr(\"wcsPoints\", wcsPoints);\n });\n\n this._ref.on(\"dragend\", () => {\n const absoluteTransform = this._ref.getAbsoluteTransform();\n\n const wcsPoints = [];\n const points = this._ref.points();\n let wcsPoint;\n for (let i = 0; i < points.length; i += 2) {\n const position = absoluteTransform.point({ x: points[i], y: points[i + 1] });\n wcsPoint = this._worldTransformer.screenToWorld({ x: position.x, y: position.y });\n wcsPoints.push({ x: wcsPoint.x, y: wcsPoint.y, z: wcsPoint.z });\n }\n this._ref.setAttr(\"wcsPoints\", wcsPoints);\n });\n\n this._ref.id(this._ref._id.toString());\n }\n\n ref() {\n return this._ref;\n }\n\n id(): string {\n return this._ref.id();\n }\n\n enableMouseEditing(value: boolean): void {\n this._ref.draggable(value);\n }\n\n type(): string {\n return \"Line\";\n }\n\n getColor(): string {\n return this._ref.stroke() as string;\n }\n\n setColor(hex: string) {\n this._ref.stroke(hex);\n }\n\n getRotation(): number {\n return this._ref.rotation();\n }\n\n setRotation(degrees: number): void {\n this._ref.rotation(degrees);\n }\n\n getZIndex(): number {\n return this._ref.zIndex();\n }\n\n setZIndex(zIndex: number): void {\n this._ref.zIndex(zIndex);\n }\n\n delete(): void {\n this._ref.destroy();\n this._ref = null;\n }\n\n getPoints(): number[] {\n return this._ref.points();\n }\n\n setLineWidth(size: number) {\n this._ref.strokeWidth(size);\n }\n\n getLineWidth(): number {\n return this._ref.strokeWidth();\n }\n\n getLineType(): string {\n const typeSpecs = this._ref.dash() || [];\n let type: MarkupLineType;\n switch (typeSpecs) {\n case LineTypeSpecs.get(\"dot\"):\n type = \"dot\";\n break;\n case LineTypeSpecs.get(\"dash\"):\n type = \"dash\";\n break;\n default:\n type = \"solid\";\n break;\n }\n return type;\n }\n\n setLineType(type: string) {\n const specs = LineTypeSpecs.get(type);\n if (specs) this._ref.dash(specs);\n }\n\n addPoints(points: [{ x: number; y: number }]) {\n let newPoints = this._ref.points();\n const wcsPoints = this._ref.getAttr(\"wcsPoints\");\n points.forEach((point) => {\n newPoints = newPoints.concat([point.x, point.y]);\n const wcsPoint = this._worldTransformer.screenToWorld(point);\n wcsPoints.push(wcsPoint);\n });\n\n this._ref.points(newPoints);\n }\n\n updateScreenCoordinates(): void {\n const wcsPoints = this._ref.getAttr(\"wcsPoints\");\n const points = [];\n let invert = this._ref.getAbsoluteTransform().copy();\n invert = invert.invert();\n wcsPoints.forEach((point) => {\n let screenPoint = this._worldTransformer.worldToScreen(point);\n screenPoint = invert.point({ x: screenPoint.x, y: screenPoint.y });\n points.push(screenPoint.x);\n points.push(screenPoint.y);\n });\n\n this._ref.points([]);\n this._ref.points(points);\n this._ref.clearCache();\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport Konva from \"konva\";\nimport { IMarkupText, IMarkupTextParams } from \"../IMarkupText\";\nimport { IWorldTransform } from \"../IWorldTransform\";\nimport { WorldTransform } from \"../WorldTransform\";\n\nexport class KonvaText implements IMarkupText {\n private _ref: Konva.Text;\n private _worldTransformer: IWorldTransform;\n private readonly TEXT_FONT_FAMILY = \"Calibri\";\n\n constructor(params: IMarkupTextParams, ref = null, worldTransformer = new WorldTransform()) {\n this._worldTransformer = worldTransformer;\n\n if (ref) {\n this._ref = ref;\n const wcsStart = this._ref.getAttr(\"wcsStart\");\n if (!wcsStart) {\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x: ref.x(), y: ref.y() }));\n }\n return;\n }\n\n if (!params) params = {};\n if (!params.position) params.position = { x: 0, y: 0 };\n if (!params.text) params.text = \"default\";\n\n this._ref = new Konva.Text({\n x: params.position.x,\n y: params.position.y,\n text: params.text,\n fontSize: params.fontSize ?? 34,\n fontFamily: this.TEXT_FONT_FAMILY,\n fill: params.color ?? \"#ff0000\",\n align: \"left\",\n draggable: true,\n rotation: params.rotation ?? 0,\n });\n\n this._ref.width(this._ref.getTextWidth());\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x: params.position.x, y: params.position.y }));\n\n this._ref.on(\"transform\", (e) => {\n const attrs = e.target.attrs;\n\n if (attrs.rotation !== this._ref.rotation()) this._ref.rotation(attrs.rotation);\n\n const scaleByX = Math.abs(attrs.scaleX - 1) > 10e-6;\n const scaleByY = Math.abs(attrs.scaleY - 1) > 10e-6;\n\n let newWidth = this._ref.width();\n if (scaleByX) newWidth *= attrs.scaleX;\n let newHeight = this._ref.height();\n if (scaleByY) newHeight *= attrs.scaleY;\n\n const minWidth = 50;\n\n if (newWidth < minWidth) newWidth = minWidth;\n if (newHeight < Math.round(this.getFontSize())) newHeight = Math.round(this.getFontSize());\n\n if (scaleByX) {\n this._ref.width(newWidth);\n }\n\n if (scaleByY) {\n this._ref.height(newHeight);\n }\n\n this._ref.scale({ x: 1, y: 1 });\n });\n\n this._ref.on(\"transformend\", (e) => {\n const attrs = e.target.attrs;\n if (attrs.rotation !== this._ref.rotation()) this._ref.rotation(attrs.rotation);\n\n const absoluteTransform = this._ref.getStage().getAbsoluteTransform();\n const position = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() });\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld(position));\n });\n\n this._ref.on(\"dragend\", () => {\n const absoluteTransform = this._ref.getStage().getAbsoluteTransform();\n const position = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() });\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld(position));\n });\n\n this._ref.id(this._ref._id.toString());\n }\n\n ref() {\n return this._ref;\n }\n\n id(): string {\n return this._ref.id();\n }\n\n enableMouseEditing(value: boolean): void {\n this._ref.draggable(value);\n }\n\n type(): string {\n return \"Text\";\n }\n\n getColor(): string {\n return this._ref.fill() as string;\n }\n\n setColor(hex: string): void {\n this._ref.fill(hex);\n }\n\n getRotation(): number {\n return this._ref.rotation();\n }\n\n setRotation(degrees: number): void {\n this._ref.rotation(degrees);\n }\n\n getZIndex(): number {\n return this._ref.zIndex();\n }\n\n setZIndex(zIndex: number): void {\n this._ref.zIndex(zIndex);\n }\n\n delete(): void {\n this._ref.destroy();\n this._ref = null;\n }\n\n getText(): string {\n return this._ref.text();\n }\n\n setText(text: string): void {\n this._ref.text(text);\n }\n\n getPosition(): { x: number; y: number } {\n return this._ref.getPosition();\n }\n\n setPosition(x: number, y: number): void {\n this._ref.setPosition({ x, y });\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x, y }));\n }\n\n getFontSize(): number {\n return this._ref.fontSize();\n }\n\n setFontSize(size: number): void {\n this._ref.fontSize(size);\n }\n\n updateScreenCoordinates(): void {\n const screenPositionStart = this._worldTransformer.worldToScreen(this._ref.getAttr(\"wcsStart\"));\n\n let invert = this._ref.getStage().getAbsoluteTransform().copy();\n invert = invert.invert();\n const positionStart = invert.point(screenPositionStart);\n\n this._ref.position({ x: positionStart.x, y: positionStart.y });\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport Konva from \"konva\";\nimport { IMarkupRectangle, IMarkupRectangleParams } from \"../IMarkupRectangle\";\nimport { IWorldTransform } from \"../IWorldTransform\";\nimport { WorldTransform } from \"../WorldTransform\";\n\nexport class KonvaRectangle implements IMarkupRectangle {\n private _ref: Konva.Rect;\n private _worldTransformer: IWorldTransform;\n\n constructor(params: IMarkupRectangleParams, ref = null, worldTransformer = new WorldTransform()) {\n this._worldTransformer = worldTransformer;\n\n if (ref) {\n this._ref = ref;\n const wcsStart = this._ref.getAttr(\"wcsStart\");\n const wcsEnd = this._ref.getAttr(\"wcsEnd\");\n\n if (!wcsStart) {\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x: ref.x(), y: ref.y() }));\n }\n if (!wcsEnd) {\n const rightBottomPoint = { x: ref.x() + ref.width(), y: ref.y() + ref.height() };\n this._ref.setAttr(\n \"wcsEnd\",\n this._worldTransformer.screenToWorld({ x: rightBottomPoint.x, y: rightBottomPoint.y })\n );\n }\n return;\n }\n\n if (!params) params = {};\n if (!params.position) params.position = { x: 0, y: 0 };\n if (params.position2) {\n params.width = params.position2.x - params.position.x;\n params.height = params.position2.y - params.position.y;\n } else {\n if (!params.width || !params.height) {\n params.position2 = { x: 200, y: 200 };\n params.width = 200;\n params.height = 200;\n } else {\n params.position2 = { x: params.position.x + params.width, y: params.position.y + params.height };\n }\n }\n\n this._ref = new Konva.Rect({\n stroke: params.color ?? \"#ff0000\",\n strokeWidth: params.lineWidth ?? 4,\n globalCompositeOperation: \"source-over\",\n lineCap: \"round\",\n lineJoin: \"round\",\n x: params.position.x,\n y: params.position.y,\n width: params.width ?? 200,\n height: params.height ?? 200,\n draggable: true,\n strokeScaleEnabled: false,\n });\n\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x: params.position.x, y: params.position.y }));\n this._ref.setAttr(\"wcsEnd\", this._worldTransformer.screenToWorld({ x: params.position2.x, y: params.position2.y }));\n\n this._ref.on(\"transform\", (e) => {\n const attrs = e.target.attrs;\n const scaleByX = Math.abs(attrs.scaleX - 1) > 10e-6;\n const scaleByY = Math.abs(attrs.scaleY - 1) > 10e-6;\n\n let newWidth = this._ref.width();\n if (scaleByX) newWidth *= attrs.scaleX;\n let newHeight = this._ref.height();\n if (scaleByY) newHeight *= attrs.scaleY;\n\n const minWidth = 50;\n const minHeight = 50;\n\n if (newWidth < minWidth) newWidth = minWidth;\n if (newHeight < minHeight) newHeight = minHeight;\n\n if (scaleByX) {\n this._ref.width(newWidth);\n }\n\n if (scaleByY) {\n this._ref.height(newHeight);\n }\n\n this._ref.scale({ x: 1, y: 1 });\n });\n\n this._ref.on(\"transformend\", (e) => {\n const attrs = e.target.attrs;\n if (attrs.rotation !== this._ref.rotation()) this._ref.rotation(attrs.rotation);\n\n const absoluteTransform = this._ref.getStage().getAbsoluteTransform();\n const position = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() });\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld(position));\n this._ref.setAttr(\n \"wcsEnd\",\n this._worldTransformer.screenToWorld({ x: position.x + this._ref.width(), y: position.y + this._ref.height() })\n );\n });\n\n this._ref.on(\"dragend\", () => {\n const absoluteTransform = this._ref.getStage().getAbsoluteTransform();\n const position = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() });\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld(position));\n this._ref.setAttr(\n \"wcsEnd\",\n this._worldTransformer.screenToWorld({ x: position.x + this._ref.width(), y: position.y + this._ref.height() })\n );\n });\n\n this._ref.id(this._ref._id.toString());\n }\n\n getPosition(): { x: number; y: number } {\n return this._ref.position();\n }\n\n getWidth(): number {\n return this._ref.width();\n }\n\n getHeight(): number {\n return this._ref.height();\n }\n\n setWidth(w: number): void {\n this._ref.width(w);\n\n const rightLowerPoint = { x: this._ref.x() + w, y: this._ref.y() + this._ref.height() };\n const wcsRightLowerPoint = this._worldTransformer.screenToWorld(rightLowerPoint);\n this._ref.setAttr(\"wcsEnd\", wcsRightLowerPoint);\n }\n\n setHeight(h: number): void {\n this._ref.height(h);\n\n const rightLowerPoint = { x: this._ref.x() + this._ref.width(), y: this._ref.y() + h };\n const wcsRightLowerPoint = this._worldTransformer.screenToWorld(rightLowerPoint);\n this._ref.setAttr(\"wcsEnd\", wcsRightLowerPoint);\n }\n\n setPosition(x: number, y: number): void {\n this._ref.setPosition({ x, y });\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x, y }));\n const rightLowerPoint = { x: x + this._ref.width(), y: y + this._ref.y() };\n const wcsRightLowerPoint = this._worldTransformer.screenToWorld(rightLowerPoint);\n this._ref.setAttr(\"wcsEnd\", wcsRightLowerPoint);\n }\n\n ref() {\n return this._ref;\n }\n\n id(): string {\n return this._ref.id();\n }\n\n enableMouseEditing(value: boolean): void {\n this._ref.draggable(value);\n }\n\n type(): string {\n return \"Rectangle\";\n }\n\n getColor(): string {\n return this._ref.stroke() as string;\n }\n\n setColor(hex: string): void {\n this._ref.stroke(hex);\n }\n\n getRotation(): number {\n return this._ref.rotation();\n }\n\n setRotation(degrees: number): void {\n this._ref.rotation(degrees);\n }\n\n getZIndex(): number {\n return this._ref.zIndex();\n }\n\n setZIndex(zIndex: number): void {\n this._ref.zIndex(zIndex);\n }\n\n delete(): void {\n this._ref.destroy();\n this._ref = null;\n }\n\n setLineWidth(size: number): void {\n this._ref.strokeWidth(size);\n }\n\n getLineWidth(): number {\n return this._ref.strokeWidth();\n }\n\n updateScreenCoordinates(): void {\n const screenPositionStart = this._worldTransformer.worldToScreen(this._ref.getAttr(\"wcsStart\"));\n const screenPositionEnd = this._worldTransformer.worldToScreen(this._ref.getAttr(\"wcsEnd\"));\n\n let invert = this._ref.getStage().getAbsoluteTransform().copy();\n invert = invert.invert();\n const positionStart = invert.point(screenPositionStart);\n const positionEnd = invert.point(screenPositionEnd);\n\n this._ref.position({ x: positionStart.x, y: positionStart.y });\n this._ref.width(Math.abs(positionEnd.x - positionStart.x));\n this._ref.height(Math.abs(positionEnd.y - positionStart.y));\n }\n}\n","export function getDistanceIn2D(p1: { x: number; y: number }, p2: { x: number; y: number }): number {\n return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport Konva from \"konva\";\nimport { IMarkupEllipse, IMarkupEllipseParams } from \"../IMarkupEllipse\";\nimport { IWorldTransform } from \"../IWorldTransform\";\nimport { WorldTransform } from \"../WorldTransform\";\nimport * as utils from \"../Utils\";\n\nexport class KonvaEllipse implements IMarkupEllipse {\n private _ref: Konva.Ellipse;\n private _worldTransformer: IWorldTransform;\n\n constructor(params: IMarkupEllipseParams, ref = null, worldTransformer = new WorldTransform()) {\n this._worldTransformer = worldTransformer;\n\n if (ref) {\n this._ref = ref;\n\n const wcsPosition = this._ref.getAttr(\"wcsPosition\");\n const radiusX = this._ref.getAttr(\"wcsRadiusX\");\n const radiusY = this._ref.getAttr(\"wcsRadiusY\");\n if (!wcsPosition) {\n this._ref.setAttr(\"wcsPosition\", this._worldTransformer.screenToWorld({ x: ref.x(), y: ref.y() }));\n }\n if (!radiusX) {\n this._ref.setAttr(\n \"wcsRadiusX\",\n this._worldTransformer.screenToWorld({ x: ref.x() + ref.radiusX(), y: ref.y() })\n );\n }\n if (!radiusY) {\n this._ref.setAttr(\n \"wcsRadiusY\",\n this._worldTransformer.screenToWorld({ x: ref.x(), y: ref.y() + ref.radiusY() })\n );\n }\n\n return;\n }\n\n if (!params) params = {};\n if (!params.position) params.position = { x: 0, y: 0 };\n if (params.position2) {\n params.radius ??= { x: 0, y: 0 };\n params.radius.x = utils.getDistanceIn2D(params.position, params.position2);\n if (params.position3) params.radius.y = utils.getDistanceIn2D(params.position, params.position3);\n else params.radius.x = params.radius.y;\n } else {\n if (!params.radius) params.radius = { x: 25, y: 25 };\n }\n\n this._ref = new Konva.Ellipse({\n stroke: params.color ?? \"#ff0000\",\n strokeWidth: params.lineWidth ?? 4,\n globalCompositeOperation: \"source-over\",\n lineCap: \"round\",\n lineJoin: \"round\",\n x: params.position.x,\n y: params.position.y,\n radiusX: params.radius.x,\n radiusY: params.radius.y,\n draggable: true,\n strokeScaleEnabled: false,\n });\n\n this._ref.setAttr(\n \"wcsPosition\",\n this._worldTransformer.screenToWorld({ x: params.position.x, y: params.position.y })\n );\n this._ref.setAttr(\n \"wcsRadiusX\",\n this._worldTransformer.screenToWorld({ x: this._ref.x() + params.radius.x, y: this._ref.y() })\n );\n this._ref.setAttr(\n \"wcsRadiusY\",\n this._worldTransformer.screenToWorld({ x: this._ref.x(), y: this._ref.y() + params.radius.y })\n );\n\n this._ref.on(\"transform\", (e) => {\n const attrs = e.target.attrs;\n\n if (attrs.rotation !== this._ref.rotation()) this._ref.rotation(attrs.rotation);\n\n const scaleByX = Math.abs(attrs.scaleX - 1) > 10e-6;\n const scaleByY = Math.abs(attrs.scaleY - 1) > 10e-6;\n\n let newRadiusX = this._ref.radiusX();\n if (scaleByX) newRadiusX *= attrs.scaleX;\n let newRadiusY = this._ref.radiusY();\n if (scaleByY) newRadiusY *= attrs.scaleY;\n\n const minRadiusX = 25;\n const minRadiusY = 25;\n\n if (newRadiusX < minRadiusX) newRadiusX = minRadiusX;\n if (newRadiusY < minRadiusY) newRadiusY = minRadiusY;\n\n if (e.evt.ctrlKey || e.evt.shiftKey) {\n if (scaleByX) {\n this._ref.radius({ x: newRadiusX, y: newRadiusX });\n } else {\n this._ref.radius({ x: newRadiusY, y: newRadiusY });\n }\n } else {\n this._ref.radius({ x: newRadiusX, y: newRadiusY });\n }\n\n this._ref.scale({ x: 1, y: 1 });\n });\n\n this._ref.on(\"transformend\", () => {\n const absoluteTransform = this._ref.getStage().getAbsoluteTransform();\n const position = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() });\n this._ref.setAttr(\"wcsPosition\", this._worldTransformer.screenToWorld(position));\n const radiusX = absoluteTransform.point({ x: this._ref.x() + this._ref.radiusX(), y: this._ref.y() });\n this._ref.setAttr(\"wcsRadiusX\", this._worldTransformer.screenToWorld(radiusX));\n const radiusY = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() + this._ref.radiusY() });\n this._ref.setAttr(\"wcsRadiusY\", this._worldTransformer.screenToWorld(radiusY));\n });\n\n this._ref.on(\"dragend\", () => {\n const absoluteTransform = this._ref.getStage().getAbsoluteTransform();\n const position = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() });\n this._ref.setAttr(\"wcsPosition\", this._worldTransformer.screenToWorld(position));\n const radiusX = absoluteTransform.point({ x: this._ref.x() + this._ref.radiusX(), y: this._ref.y() });\n this._ref.setAttr(\"wcsRadiusX\", this._worldTransformer.screenToWorld(radiusX));\n const radiusY = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() + this._ref.radiusY() });\n this._ref.setAttr(\"wcsRadiusY\", this._worldTransformer.screenToWorld(radiusY));\n });\n\n this._ref.id(this._ref._id.toString());\n }\n\n getPosition(): { x: number; y: number } {\n return this._ref.position();\n }\n\n setPosition(x: number, y: number): void {\n this._ref.setPosition({ x, y });\n this._ref.setAttr(\"wcsPosition\", this._worldTransformer.screenToWorld({ x, y }));\n }\n\n getRadiusX(): number {\n return this._ref.radiusX();\n }\n\n setRadiusX(r: number): void {\n this._ref.radiusX(r);\n this._ref.setAttr(\"wcsRadiusX\", this._worldTransformer.screenToWorld({ x: this._ref.x() + r, y: this._ref.y() }));\n }\n\n getRadiusY(): number {\n return this._ref.radiusY();\n }\n\n setRadiusY(r: number): void {\n this._ref.radiusY(r);\n this._ref.setAttr(\"wcsRadiusY\", this._worldTransformer.screenToWorld({ x: this._ref.x(), y: this._ref.y() + r }));\n }\n\n getLineWidth(): number {\n return this._ref.strokeWidth();\n }\n\n setLineWidth(size: number): void {\n this._ref.strokeWidth(size);\n }\n\n ref() {\n return this._ref;\n }\n\n id(): string {\n return this._ref.id();\n }\n\n enableMouseEditing(value: boolean): void {\n this._ref.draggable(value);\n }\n\n type(): string {\n return \"Ellipse\";\n }\n\n getColor(): string {\n return this._ref.stroke() as string;\n }\n\n setColor(hex: string): void {\n this._ref.stroke(hex);\n }\n\n getRotation(): number {\n return this._ref.rotation();\n }\n\n setRotation(degrees: number): void {\n this._ref.rotation(degrees);\n }\n\n getZIndex(): number {\n return this._ref.zIndex();\n }\n\n setZIndex(zIndex: number): void {\n this._ref.zIndex(zIndex);\n }\n\n delete(): void {\n this._ref.destroy();\n this._ref = null;\n }\n\n updateScreenCoordinates(): void {\n const screenPosition = this._worldTransformer.worldToScreen(this._ref.getAttr(\"wcsPosition\"));\n const radiusX = this._worldTransformer.worldToScreen(this._ref.getAttr(\"wcsRadiusX\"));\n const radiusY = this._worldTransformer.worldToScreen(this._ref.getAttr(\"wcsRadiusY\"));\n\n let invert = this._ref.getStage().getAbsoluteTransform().copy();\n invert = invert.invert();\n const position = invert.point({ x: screenPosition.x, y: screenPosition.y });\n\n this._ref.position({ x: position.x, y: position.y });\n this._ref.radius({\n x: Math.abs(invert.point(radiusX).x - position.x),\n y: Math.abs(invert.point(radiusY).y - position.y),\n });\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport Konva from \"konva\";\nimport { IMarkupArrow, IMarkupArrowParams } from \"../IMarkupArrow\";\nimport { IWorldTransform } from \"../IWorldTransform\";\nimport { WorldTransform } from \"../WorldTransform\";\n\nexport class KonvaArrow implements IMarkupArrow {\n private _ref: Konva.Arrow;\n private _worldTransformer: IWorldTransform;\n\n constructor(params: IMarkupArrowParams, ref = null, worldTransformer = new WorldTransform()) {\n this._worldTransformer = worldTransformer;\n\n if (ref) {\n this._ref = ref;\n const wcsStart = this._ref.getAttr(\"wcsStart\");\n const wcsEnd = this._ref.getAttr(\"wcsEnd\");\n if (!wcsStart)\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x: ref.points()[0], y: ref.points()[1] }));\n if (!wcsEnd)\n this._ref.setAttr(\"wcsEnd\", this._worldTransformer.screenToWorld({ x: ref.points()[2], y: ref.points()[3] }));\n return;\n }\n\n if (!params) params = {};\n if (!params.start) params.start = { x: 0, y: 0 };\n if (!params.end) params.end = { x: 100, y: 100 };\n\n this._ref = new Konva.Arrow({\n stroke: params.color ?? \"#ff0000\",\n fill: params.color ?? \"#ff0000\",\n strokeWidth: 4,\n globalCompositeOperation: \"source-over\",\n lineCap: \"round\",\n lineJoin: \"round\",\n points: [params.start.x, params.start.y, params.end.x, params.end.y],\n draggable: true,\n strokeScaleEnabled: false,\n });\n\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x: params.start.x, y: params.start.y }));\n this._ref.setAttr(\"wcsEnd\", this._worldTransformer.screenToWorld({ x: params.end.x, y: params.end.y }));\n\n this._ref.on(\"transformend\", (e) => {\n const attrs = e.target.attrs;\n if (attrs.rotation !== this._ref.rotation()) this._ref.rotation(attrs.rotation);\n\n const points = this._ref.points();\n const absoluteTransform = this._ref.getAbsoluteTransform();\n const transformStart = absoluteTransform.point({ x: points[0], y: points[1] });\n const transformEnd = absoluteTransform.point({ x: points[2], y: points[3] });\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld(transformStart));\n this._ref.setAttr(\"wcsEnd\", this._worldTransformer.screenToWorld(transformEnd));\n });\n\n this._ref.on(\"dragend\", (e) => {\n const points = this._ref.points();\n const absoluteTransform = e.target.getAbsoluteTransform();\n const transformStart = absoluteTransform.point({ x: points[0], y: points[1] });\n const transformEnd = absoluteTransform.point({ x: points[2], y: points[3] });\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld(transformStart));\n this._ref.setAttr(\"wcsEnd\", this._worldTransformer.screenToWorld(transformEnd));\n });\n\n this._ref.id(this._ref._id.toString());\n }\n\n ref() {\n return this._ref;\n }\n\n id(): string {\n return this._ref.id();\n }\n\n enableMouseEditing(value: boolean): void {\n this._ref.draggable(value);\n }\n\n type(): string {\n return \"Arrow\";\n }\n\n getColor(): string {\n return this._ref.stroke() as string;\n }\n\n setColor(hex: string): void {\n this._ref.stroke(hex);\n this._ref.fill(hex);\n }\n\n getRotation(): number {\n return this._ref.rotation();\n }\n\n setRotation(degrees: number): void {\n this._ref.rotation(degrees);\n }\n\n getZIndex(): number {\n return this._ref.zIndex();\n }\n\n setZIndex(zIndex: number): void {\n this._ref.zIndex(zIndex);\n }\n\n delete(): void {\n this._ref.destroy();\n this._ref = null;\n }\n\n getPoints(): { x: number; y: number }[] {\n const points = this._ref.points();\n return [\n { x: points[0], y: points[1] },\n { x: points[2], y: points[3] },\n ];\n }\n\n setPoints(points: { x: number; y: number }[]): void {\n if (points.length === 2) {\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x: points[0].x, y: points[0].y }));\n this._ref.setAttr(\"wcsEnd\", this._worldTransformer.screenToWorld({ x: points[1].x, y: points[1].y }));\n this._ref.points([points[0].x, points[0].y, points[1].x, points[1].y]);\n }\n }\n\n getStartPoint(): { x: number; y: number } {\n const points = this._ref.points();\n return { x: points[0], y: points[1] };\n }\n\n setStartPoint(x: number, y: number): void {\n const points = this._ref.points();\n this._ref.points([x, y, points[2], points[3]]);\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x, y }));\n }\n\n getEndPoint(): { x: number; y: number } {\n const points = this._ref.points();\n return { x: points[2], y: points[3] };\n }\n\n setEndPoint(x: number, y: number): void {\n const points = this._ref.points();\n this._ref.points([points[0], points[1], x, y]);\n this._ref.setAttr(\"wcsEnd\", this._worldTransformer.screenToWorld({ x, y }));\n }\n\n updateScreenCoordinates(): void {\n const screenStartPoint = this._worldTransformer.worldToScreen(this._ref.getAttr(\"wcsStart\"));\n const screenEndPoint = this._worldTransformer.worldToScreen(this._ref.getAttr(\"wcsEnd\"));\n\n let invert = this._ref.getAbsoluteTransform().copy();\n invert = invert.invert();\n const startPoint = invert.point({ x: screenStartPoint.x, y: screenStartPoint.y });\n const endPoint = invert.point({ x: screenEndPoint.x, y: screenEndPoint.y });\n\n this._ref.points([startPoint.x, startPoint.y, endPoint.x, endPoint.y]);\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport Konva from \"konva\";\nimport { IMarkupImage, IMarkupImageParams } from \"../IMarkupImage\";\nimport { IWorldTransform } from \"../IWorldTransform\";\nimport { WorldTransform } from \"../WorldTransform\";\n\nexport class KonvaImage implements IMarkupImage {\n private _ref: Konva.Image;\n private _canvasImage: HTMLImageElement;\n private _ratio = 1;\n private _worldTransformer: IWorldTransform;\n\n private readonly EPSILON = 10e-6;\n private readonly BASE64_HEADER_START = \"data:image/\";\n private readonly BASE64_NOT_FOUND =\n \"data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAADsAAAA7AF5KHG9AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAmhJREFUWIXtlr9rVEEQxz+H8RQUJIdeIopYm0vkCg0GBBtbG1NF7Kxt7dR/IGIw/uhTaBNLERURg2kCEUyCYCPi70b0InjGS57FzOZN3r19d+9HJIVfWO52dma/s7Mz8xa2KAaBCWAR+AkECWOmSOIdwC1gtQOpHc+NfQ8wClQ8+1d0vcdH/lQ3bSIRGAZ2pTjAqNovANXIWlXlAXA2zvi2Ln4AjqYgtagYEutENSLvjRoOImFv5iB32Ae8UrLXwFBk3h9ndF0VJnKSO9gTu3yKu5Z1LKnS8YIcABgw5Ks692JZFXcXRJ46Aq6kikCnHNi/mQ50WwVtfaIoBzL3gRk2drSscJ2wrc4VvUoe2wn/41/iBfoVLRnBGnDSY3AAKacy8AmYR+o7K1zCl6wgrgpOAc/MuhvfgMuk+1JGHQgSBcAloKXy78AjYBppJk5/noTulseBMZ23iD/piHFkEdgTQzKk+5wHjmHC3cmBg0BD5xcSTrFXyQPgIWFtDwMvab+2N8DpbhyY1v/3E8gdDgNfVX9SCVZ0/gW4B0wB71S2BpxLcuCM/jaQSHSDEeAX4VMuAG4gTzyHbcAVXXO6GxxwIX+vvxe7JHcYQ07nHqklj96UIW/YhSWzMKcep8VVtf8B1Dw6h4DfhB+sdbgn2R+gnoEc5NR3dZ+3QJ9H74HqXLPCGlJyTfI9y3YCs0owq3OLOpKkLeBI1HhSDT/mdKIPiUCARMTlQx34TMLjtww8IczmO8AJ/N/2JNSQXAiQ671JePePge0+wzJSQq4FFzlaenIvucUAkiQLhC/mLGNZ9xgn5s63BP4CCk0QDtm4BhoAAAAASUVORK5CYII=\";\n\n constructor(params: IMarkupImageParams, ref = null, worldTransformer = new WorldTransform()) {\n this._worldTransformer = worldTransformer;\n\n if (ref) {\n if (!ref.src || !ref.src.startsWith(this.BASE64_HEADER_START)) ref.src = this.BASE64_NOT_FOUND;\n if (ref.height() <= this.EPSILON) ref.height(32);\n if (ref.width() <= this.EPSILON) ref.width(32);\n\n this._ref = ref;\n this._canvasImage = ref.image();\n this._ratio =\n this._ref.height() <= this.EPSILON || this._ref.width() <= this.EPSILON\n ? 1\n : this._ref.height() / this._ref.width();\n\n const wcsStart = this._ref.getAttr(\"wcsStart\");\n const wcsEnd = this._ref.getAttr(\"wcsEnd\");\n if (!wcsStart) {\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x: ref.x(), y: ref.y() }));\n }\n if (!wcsEnd) {\n const rightBottomPoint = { x: ref.x() + ref.width(), y: ref.y() + ref.height() };\n this._ref.setAttr(\n \"wcsEnd\",\n this._worldTransformer.screenToWorld({ x: rightBottomPoint.x, y: rightBottomPoint.y })\n );\n }\n\n return;\n }\n\n if (!params) params = {};\n if (!params.position) params.position = { x: 0, y: 0 };\n if (!params.src || !params.src.startsWith(this.BASE64_HEADER_START)) params.src = this.BASE64_NOT_FOUND;\n if (params.position2) {\n params.width = params.position2.x - params.position.x;\n params.height = params.position2.y - params.position.y;\n }\n\n this._canvasImage = new Image();\n\n this._canvasImage.onload = () => {\n this._ref.image(this._canvasImage);\n if (this._ref.height() <= this.EPSILON) this._ref.height(this._canvasImage.height);\n if (this._ref.width() <= this.EPSILON) this._ref.width(this._canvasImage.width);\n\n this._ratio =\n this._ref.height() <= this.EPSILON || this._ref.width() <= this.EPSILON\n ? 1\n : this._ref.height() / this._ref.width();\n\n // need to rescale only if input width and height are 0 - we do not loading Viewpoint with existing params\n if (\n (params.width <= this.EPSILON || params.height <= this.EPSILON) &&\n (params.maxWidth >= this.EPSILON || params.maxWidth >= this.EPSILON)\n ) {\n const heightOutOfCanvas = params.maxHeight - this._canvasImage.height;\n const widthOutOfCanvas = params.maxWidth - this._canvasImage.width;\n\n if (heightOutOfCanvas <= this.EPSILON || widthOutOfCanvas <= this.EPSILON) {\n if (widthOutOfCanvas <= this.EPSILON && widthOutOfCanvas < heightOutOfCanvas / this._ratio) {\n this._ref.height(params.maxWidth * this._ratio);\n this._ref.width(params.maxWidth);\n } else {\n this._ref.width(params.maxHeight / this._ratio);\n this._ref.height(params.maxHeight);\n }\n }\n }\n\n const wcsEnd = this._worldTransformer.screenToWorld({\n x: params.position.x + this._ref.width(),\n y: params.position.y + this._ref.height(),\n });\n this._ref.setAttr(\"wcsEnd\", wcsEnd);\n };\n\n this._canvasImage.onerror = () => {\n this._canvasImage.onerror = function () {};\n this._canvasImage.src = this.BASE64_NOT_FOUND;\n };\n\n this._canvasImage.src = params.src;\n\n this._ref = new Konva.Image({\n x: params.position.x,\n y: params.position.y,\n image: this._canvasImage,\n width: params.width ?? 0,\n height: params.height ?? 0,\n draggable: true,\n });\n\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x: params.position.x, y: params.position.y }));\n if (params.position2) {\n this._ref.setAttr(\n \"wcsEnd\",\n this._worldTransformer.screenToWorld({ x: params.position2.x, y: params.position2.y })\n );\n }\n\n this._ref.on(\"transform\", (e) => {\n const attrs = e.target.attrs;\n\n if (attrs.rotation !== this._ref.rotation()) this._ref.rotation(attrs.rotation);\n\n const scaleByX = Math.abs(attrs.scaleX - 1) > 10e-6;\n const scaleByY = Math.abs(attrs.scaleY - 1) > 10e-6;\n\n let newWidth = this._ref.width();\n if (scaleByX) newWidth *= attrs.scaleX;\n let newHeight = this._ref.height();\n if (scaleByY) newHeight *= attrs.scaleY;\n\n if (e.evt.ctrlKey || e.evt.shiftKey) {\n if (scaleByX) {\n this._ref.width(newWidth);\n this._ref.height(newWidth * this._ratio);\n } else {\n this._ref.width(newHeight / this._ratio);\n this._ref.height(newHeight);\n }\n } else {\n if (scaleByX) {\n this._ref.width(newWidth);\n }\n if (scaleByY) {\n this._ref.height(newHeight);\n }\n }\n\n this._ref.scale({ x: 1, y: 1 });\n });\n\n this._ref.on(\"transformend\", () => {\n const absoluteTransform = this._ref.getStage().getAbsoluteTransform();\n const position = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() });\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld(position));\n this._ref.setAttr(\n \"wcsEnd\",\n this._worldTransformer.screenToWorld({ x: position.x + this._ref.width(), y: position.y + this._ref.height() })\n );\n });\n\n this._ref.on(\"dragend\", () => {\n const absoluteTransform = this._ref.getStage().getAbsoluteTransform();\n const position = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() });\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld(position));\n this._ref.setAttr(\n \"wcsEnd\",\n this._worldTransformer.screenToWorld({ x: position.x + this._ref.width(), y: position.y + this._ref.height() })\n );\n });\n\n this._ref.id(this._ref._id.toString());\n }\n\n getSrc(): string {\n return this._canvasImage.src;\n }\n\n setSrc(src: any) {\n this._canvasImage.src = src;\n }\n\n getWidth(): number {\n return this._ref.width();\n }\n\n setWidth(w: number): void {\n this._ref.width(w);\n this._ref.height(w * this._ratio);\n\n const rightLowerPoint = { x: this._ref.x() + w, y: this._ref.y() + this._ref.height() };\n const wcsRightLowerPoint = this._worldTransformer.screenToWorld(rightLowerPoint);\n this._ref.setAttr(\"wcsEnd\", wcsRightLowerPoint);\n }\n\n getHeight(): number {\n return this._ref.height();\n }\n\n setHeight(h: number): void {\n this._ref.height(h);\n this._ref.width(h / this._ratio);\n\n const rightLowerPoint = { x: this._ref.x() + this._ref.width(), y: this._ref.y() + h };\n const wcsRightLowerPoint = this._worldTransformer.screenToWorld(rightLowerPoint);\n this._ref.setAttr(\"wcsEnd\", wcsRightLowerPoint);\n }\n\n ref() {\n return this._ref;\n }\n\n id(): string {\n return this._ref.id();\n }\n\n enableMouseEditing(value: boolean): void {\n this._ref.draggable(value);\n }\n\n type(): string {\n return \"Image\";\n }\n\n getRotation(): number {\n return this._ref.rotation();\n }\n\n setRotation(degrees: number): void {\n this._ref.rotation(degrees);\n }\n\n getZIndex(): number {\n return this._ref.zIndex();\n }\n\n setZIndex(zIndex: number): void {\n this._ref.zIndex(zIndex);\n }\n\n delete(): void {\n this._ref.destroy();\n this._ref = null;\n }\n\n getPosition(): { x: number; y: number } {\n return this._ref.getPosition();\n }\n\n setPosition(x: number, y: number): void {\n this._ref.setPosition({ x, y });\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x, y }));\n const rightLowerPoint = { x: x + this._ref.width(), y: y + this._ref.y() };\n const wcsRightLowerPoint = this._worldTransformer.screenToWorld(rightLowerPoint);\n this._ref.setAttr(\"wcsEnd\", wcsRightLowerPoint);\n }\n\n updateScreenCoordinates(): void {\n const screenPositionStart = this._worldTransformer.worldToScreen(this._ref.getAttr(\"wcsStart\"));\n const screenPositionEnd = this._worldTransformer.worldToScreen(this._ref.getAttr(\"wcsEnd\"));\n\n let invert = this._ref.getStage().getAbsoluteTransform().copy();\n invert = invert.invert();\n const positionStart = invert.point(screenPositionStart);\n const positionEnd = invert.point(screenPositionEnd);\n\n this._ref.position({ x: positionStart.x, y: positionStart.y });\n this._ref.width(Math.abs(positionEnd.x - positionStart.x));\n this._ref.height(Math.abs(positionEnd.y - positionStart.y));\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport Konva from \"konva\";\nimport { IMarkupCloud, IMarkupCloudParams } from \"../IMarkupCloud\";\nimport { IWorldTransform } from \"../IWorldTransform\";\nimport { WorldTransform } from \"../WorldTransform\";\n\nexport class KonvaCloud implements IMarkupCloud {\n private _ref: Konva.Shape;\n private _worldTransformer: IWorldTransform;\n\n constructor(params: IMarkupCloudParams, ref = null, worldTransformer = new WorldTransform()) {\n this._worldTransformer = worldTransformer;\n\n if (ref) {\n this._ref = ref;\n const wcsStart = this._ref.getAttr(\"wcsStart\");\n const wcsEnd = this._ref.getAttr(\"wcsEnd\");\n if (!wcsStart) {\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x: ref.x(), y: ref.y() }));\n }\n if (!wcsEnd) {\n const rightBottomPoint = { x: ref.x() + ref.width(), y: ref.y() + ref.height() };\n this._ref.setAttr(\n \"wcsEnd\",\n this._worldTransformer.screenToWorld({ x: rightBottomPoint.x, y: rightBottomPoint.y })\n );\n }\n return;\n }\n\n if (!params) params = {};\n if (!params.position) params.position = { x: 0, y: 0 };\n if (params.position2) {\n params.width = params.position2.x - params.position.x;\n params.height = params.position2.y - params.position.y;\n } else {\n if (!params.width || !params.height) {\n params.position2 = { x: 200, y: 200 };\n params.width = 200;\n params.height = 200;\n } else {\n params.position2 = { x: params.position.x + params.width, y: params.position.y + params.height };\n }\n }\n\n const ARC_RADIUS = 8;\n const ARC_LENGTH = 15;\n const MIN_CLOUD_WIDTH = 50;\n const MIN_CLOUD_HEIGHT = 50;\n\n this._ref = new Konva.Shape({\n x: params.position.x,\n y: params.position.y,\n width: params.width ?? 200,\n height: params.height ?? 200,\n stroke: params.color ?? \"#ff0000\",\n strokeWidth: params.lineWidth ?? 4,\n draggable: true,\n strokeScaleEnabled: false,\n globalCompositeOperation: \"source-over\",\n sceneFunc: (context, shape) => {\n const width = this._ref.width();\n const height = this._ref.height();\n const points = [\n { x: 0, y: 0 },\n { x: 0 + width, y: 0 },\n { x: 0 + width, y: 0 + height },\n { x: 0, y: 0 + height },\n { x: 0, y: 0 },\n ];\n\n if (width >= MIN_CLOUD_WIDTH - 1 || height >= MIN_CLOUD_HEIGHT - 1) drawCloud(ARC_RADIUS, ARC_LENGTH);\n else if (width >= MIN_CLOUD_WIDTH / 2 || height >= MIN_CLOUD_HEIGHT / 2)\n drawCloud(ARC_RADIUS / 2, ARC_LENGTH / 2);\n else drawRectangle();\n\n function calculateMidpoint(position) {\n const midX = position.x + width / 2;\n const midY = position.y + height / 2;\n return { x: midX, y: midY };\n }\n\n function drawCloud(arcRadius, arcLength) {\n const midPoint = calculateMidpoint({ x: 0, y: 0 });\n\n context.beginPath();\n for (let iPoint = 0; iPoint < points.length - 1; iPoint++) {\n let approxArcLength = arcLength;\n const dx = points[iPoint + 1].x - points[iPoint].x;\n const dy = points[iPoint + 1].y - points[iPoint].y;\n const length = Math.sqrt(dx * dx + dy * dy);\n\n const arcCount = Math.floor(length / approxArcLength);\n const lengthMod = length % approxArcLength;\n approxArcLength = arcLength + arcCount / lengthMod;\n\n let pX = points[iPoint].x + dx / arcCount / 2;\n let pY = points[iPoint].y + dy / arcCount / 2;\n const pEndX = points[iPoint + 1].x;\n const pEndY = points[iPoint + 1].y;\n const endAngle = Math.atan((pEndY - pY) / (pEndX - pX));\n const startAngle = endAngle + Math.PI;\n const counterClockwise = pX > midPoint.x && pY > midPoint.y;\n for (let iArc = 0; iArc < arcCount; iArc++) {\n if (counterClockwise) {\n context.arc(pX, pY, arcRadius, endAngle, startAngle);\n } else {\n context.arc(pX, pY, arcRadius, startAngle, endAngle);\n }\n\n pX += dx / arcCount;\n pY += dy / arcCount;\n }\n }\n\n context.closePath();\n // (!) Konva specific method, it is very important\n // it will apply are required styles\n context.fillStrokeShape(shape);\n }\n\n function drawRectangle() {\n context.beginPath();\n context.lineTo(points[1].x, points[1].y);\n context.lineTo(points[2].x, points[2].y);\n context.lineTo(points[3].x, points[3].y);\n context.lineTo(points[4].x, points[4].y);\n context.closePath();\n // (!) Konva specific method, it is very important\n // it will apply are required styles\n context.fillStrokeShape(shape);\n }\n },\n });\n\n this._ref.className = \"Cloud\";\n\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x: params.position.x, y: params.position.y }));\n this._ref.setAttr(\"wcsEnd\", this._worldTransformer.screenToWorld({ x: params.position2.x, y: params.position2.y }));\n\n this._ref.on(\"transform\", (e) => {\n const attrs = e.target.attrs;\n\n const scaleByX = Math.abs(attrs.scaleX - 1) > 10e-6;\n const scaleByY = Math.abs(attrs.scaleY - 1) > 10e-6;\n\n let newWidth = this._ref.width();\n if (scaleByX) newWidth *= attrs.scaleX;\n let newHeight = this._ref.height();\n if (scaleByY) newHeight *= attrs.scaleY;\n\n if (newWidth < MIN_CLOUD_WIDTH) newWidth = MIN_CLOUD_WIDTH;\n if (newHeight < MIN_CLOUD_HEIGHT) newHeight = MIN_CLOUD_HEIGHT;\n\n if (scaleByX) {\n this._ref.width(newWidth);\n }\n\n if (scaleByY) {\n this._ref.height(newHeight);\n }\n\n this._ref.scale({ x: 1, y: 1 });\n });\n\n this._ref.on(\"transformend\", (e) => {\n const attrs = e.target.attrs;\n if (attrs.rotation !== this._ref.rotation()) this._ref.rotation(attrs.rotation);\n\n const absoluteTransform = this._ref.getStage().getAbsoluteTransform();\n const position = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() });\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld(position));\n this._ref.setAttr(\n \"wcsEnd\",\n this._worldTransformer.screenToWorld({ x: position.x + this._ref.width(), y: position.y + this._ref.height() })\n );\n });\n\n this._ref.on(\"dragend\", () => {\n const absoluteTransform = this._ref.getStage().getAbsoluteTransform();\n const position = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() });\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld(position));\n this._ref.setAttr(\n \"wcsEnd\",\n this._worldTransformer.screenToWorld({ x: position.x + this._ref.width(), y: position.y + this._ref.height() })\n );\n });\n\n this._ref.getSelfRect = () => {\n return {\n x: 0 - ARC_RADIUS,\n y: 0 - ARC_RADIUS,\n width: this._ref.width() + 2 * ARC_RADIUS,\n height: this._ref.height() + 2 * ARC_RADIUS,\n };\n };\n\n this._ref.id(this._ref._id.toString());\n }\n\n ref() {\n return this._ref;\n }\n\n id(): string {\n return this._ref.id();\n }\n\n enableMouseEditing(value: boolean): void {\n this._ref.draggable(value);\n }\n\n type(): string {\n return \"Cloud\";\n }\n\n getColor(): string {\n return this._ref.stroke() as string;\n }\n\n setColor(hex: string): void {\n this._ref.stroke(hex);\n }\n\n getRotation(): number {\n return this._ref.rotation();\n }\n\n setRotation(degrees: number): void {\n this._ref.rotation(degrees);\n }\n\n getZIndex(): number {\n return this._ref.zIndex();\n }\n\n setZIndex(zIndex: number): void {\n this._ref.zIndex(zIndex);\n }\n\n delete(): void {\n this._ref.destroy();\n this._ref = null;\n }\n\n getPosition() {\n return this._ref.position();\n }\n\n setPosition(x: number, y: number): void {\n this._ref.position({ x, y });\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x, y }));\n const rightLowerPoint = { x: x + this._ref.width(), y: y + this._ref.y() };\n const wcsRightLowerPoint = this._worldTransformer.screenToWorld(rightLowerPoint);\n this._ref.setAttr(\"wcsEnd\", wcsRightLowerPoint);\n }\n\n getWidth(): number {\n return this._ref.width();\n }\n\n setWidth(w: number): void {\n this._ref.width(w);\n\n const rightLowerPoint = { x: this._ref.x() + w, y: this._ref.y() + this._ref.height() };\n const wcsRightLowerPoint = this._worldTransformer.screenToWorld(rightLowerPoint);\n this._ref.setAttr(\"wcsEnd\", wcsRightLowerPoint);\n }\n\n getHeight(): number {\n return this._ref.height();\n }\n\n setHeight(h: number): void {\n this._ref.height(h);\n\n const rightLowerPoint = { x: this._ref.x() + this._ref.width(), y: this._ref.y() + h };\n const wcsRightLowerPoint = this._worldTransformer.screenToWorld(rightLowerPoint);\n this._ref.setAttr(\"wcsEnd\", wcsRightLowerPoint);\n }\n\n getLineWidth(): number {\n return this._ref.strokeWidth();\n }\n\n setLineWidth(size: number): void {\n this._ref.strokeWidth(size);\n }\n\n updateScreenCoordinates(): void {\n const screenPositionStart = this._worldTransformer.worldToScreen(this._ref.getAttr(\"wcsStart\"));\n const screenPositionEnd = this._worldTransformer.worldToScreen(this._ref.getAttr(\"wcsEnd\"));\n\n let invert = this._ref.getStage().getAbsoluteTransform().copy();\n invert = invert.invert();\n const positionStart = invert.point(screenPositionStart);\n const positionEnd = invert.point(screenPositionEnd);\n\n this._ref.position({ x: positionStart.x, y: positionStart.y });\n this._ref.width(Math.abs(positionEnd.x - positionStart.x));\n this._ref.height(Math.abs(positionEnd.y - positionStart.y));\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport Konva from \"konva\";\nimport { IEventEmitter } from \"@inweb/eventemitter2\";\nimport {\n ChangeActiveDraggerEvent,\n IArrow,\n ICloud,\n IEllipse,\n IImage,\n ILine,\n IRectangle,\n IText,\n IViewpoint,\n} from \"@inweb/viewer-core\";\n\nimport { IMarkup, MarkupMode } from \"../IMarkup\";\nimport { IWorldTransform } from \"../IWorldTransform\";\nimport { WorldTransform } from \"../WorldTransform\";\nimport { IMarkupObject } from \"../IMarkupObject\";\nimport { MarkupLineType } from \"../IMarkupLine\";\nimport { MarkupColor } from \"./MarkupColor\";\nimport { KonvaLine } from \"./KonvaLine\";\nimport { KonvaText } from \"./KonvaText\";\nimport { KonvaRectangle } from \"./KonvaRectangle\";\nimport { KonvaEllipse } from \"./KonvaEllipse\";\nimport { KonvaArrow } from \"./KonvaArrow\";\nimport { KonvaImage } from \"./KonvaImage\";\nimport { KonvaCloud } from \"./KonvaCloud\";\n\nconst MarkupMode2Konva = {\n SelectMarkup: {\n name: \"SelectMarkup\",\n initializer: null,\n },\n Line: {\n name: \"Line\",\n initializer: (ref: any, params = null, ...attr: any) => new KonvaLine(params, ref, ...attr),\n },\n Text: {\n name: \"Text\",\n initializer: (ref: any, params = null, ...attr: any) => new KonvaText(params, ref, ...attr),\n },\n Rectangle: {\n name: \"Rect\",\n initializer: (ref: any, params = null, ...attr: any) => new KonvaRectangle(params, ref, ...attr),\n },\n Ellipse: {\n name: \"Ellipse\",\n initializer: (ref: any, params = null, ...attr: any) => new KonvaEllipse(params, ref, ...attr),\n },\n Arrow: {\n name: \"Arrow\",\n initializer: (ref: any, params = null, ...attr: any) => new KonvaArrow(params, ref, ...attr),\n },\n Image: {\n name: \"Image\",\n initializer: (ref: any, params = null, ...attr: any) => new KonvaImage(params, ref, ...attr),\n },\n Cloud: {\n name: \"Cloud\",\n initializer: (ref: any, params = null, ...attr: any) => new KonvaCloud(params, ref, ...attr),\n },\n};\n\n/**\n * 2D markup core.\n */\nexport class KonvaMarkup implements IMarkup {\n private _viewer: IEventEmitter;\n private _worldTransformer: IWorldTransform;\n private _container: HTMLElement;\n private _markupIsActive = false;\n private _markupMode: MarkupMode;\n private _markupColor = new MarkupColor(255, 0, 0);\n private _konvaStage: Konva.Stage;\n private _konvaLayer: Konva.Layer;\n private _konvaTransformer: Konva.Transformer;\n\n private _textInputRef: HTMLTextAreaElement;\n private _textInputPos: Konva.Vector2d;\n private _textInputAngle: number;\n private _imageInputRef: HTMLInputElement;\n private _imageInputPos: Konva.Vector2d;\n private _markupContainer: HTMLDivElement;\n private _resizeObserver: ResizeObserver;\n private _groupImages: Konva.Group;\n private _groupGeometry: Konva.Group;\n private _groupTexts: Konva.Group;\n\n public lineWidth = 4;\n public lineType: MarkupLineType = \"solid\";\n public fontSize = 34;\n\n initialize(\n container: HTMLElement,\n containerEvents?: string[],\n viewer?: IEventEmitter,\n worldTransformer?: IWorldTransform\n ): void {\n this._viewer = viewer;\n this._worldTransformer = worldTransformer ?? new WorldTransform();\n this._container = container;\n\n this._markupContainer = document.createElement(\"div\");\n this._markupContainer.id = \"markup-container\";\n this._markupContainer.style.position = \"absolute\";\n this._markupContainer.style.outline = \"0px\"; // <- to eliminate grey box during delete elements\n this._markupContainer.style.pointerEvents = \"none\";\n\n const parentDiv = this._container.parentElement;\n parentDiv.appendChild(this._markupContainer);\n\n this._markupColor.setColor(255, 0, 0);\n\n this.initializeKonva();\n\n this._resizeObserver = new ResizeObserver(this.resizeContainer);\n this._resizeObserver.observe(container);\n\n if (this._viewer) {\n this._viewer.addEventListener(\"changeactivedragger\", this.changeActiveDragger);\n this._viewer.addEventListener(\"pan\", this.pan);\n this._viewer.addEventListener(\"zoomat\", this.zoomAt);\n }\n }\n\n dispose(): void {\n if (this._viewer) {\n this._viewer.removeEventListener(\"zoomat\", this.zoomAt);\n this._viewer.removeEventListener(\"pan\", this.pan);\n this._viewer.removeEventListener(\"changeactivedragger\", this.changeActiveDragger);\n }\n\n this._resizeObserver?.disconnect();\n this._resizeObserver = undefined;\n\n this.destroyKonva();\n\n this._markupContainer?.remove();\n this._markupContainer = undefined;\n\n this._container = undefined;\n this._viewer = undefined;\n this._worldTransformer = undefined;\n\n this._markupIsActive = false;\n }\n\n changeActiveDragger = (event: ChangeActiveDraggerEvent) => {\n const draggerName = event.data;\n\n this._markupContainer.className = this._container.className\n .split(\" \")\n .filter((x) => !x.startsWith(\"oda-cursor-\"))\n .filter((x) => x)\n .concat(`oda-cursor-${draggerName.toLowerCase()}`)\n .join(\" \");\n\n this.removeTextInput();\n this.removeImageInput();\n\n this.enableEditMode(draggerName as MarkupMode);\n };\n\n resizeContainer = () => {\n const { offsetLeft, offsetTop, offsetWidth, offsetHeight } = this._container;\n\n if (!offsetWidth || !offsetHeight) return; // <- invisible container, or container with parent removed\n\n this._markupContainer.style.left = `${offsetLeft}px`;\n this._markupContainer.style.top = `${offsetTop}px`;\n\n this._konvaStage.width(offsetWidth);\n this._konvaStage.height(offsetHeight);\n\n this.getObjects().forEach((markupObject) => {\n markupObject.updateScreenCoordinates();\n });\n };\n\n pan = () => {\n this.getObjects().forEach((markupObject) => {\n markupObject.updateScreenCoordinates();\n });\n };\n\n zoomAt = () => {\n this.getObjects().forEach((markupObject) => {\n markupObject.updateScreenCoordinates();\n });\n };\n\n redirectToViewer = (event: any) => {\n if (this._viewer) this._viewer.emit(event);\n };\n\n syncOverlay(): void {}\n\n clearOverlay(): void {\n this.removeTextInput();\n this.removeImageInput();\n this.clearSelected();\n this.getObjects().forEach((obj) => obj.delete());\n }\n\n getMarkupColor(): { r: number; g: number; b: number } {\n return this._markupColor.asRGB();\n }\n\n setMarkupColor(r: number, g: number, b: number): void {\n this._markupColor.setColor(r, g, b);\n this.redirectToViewer({ type: \"changemarkupcolor\", data: { r, g, b } });\n }\n\n colorizeAllMarkup(r: number, g: number, b: number): void {\n this.setMarkupColor(r, g, b);\n const hexColor = new MarkupColor(r, g, b).asHex();\n this.getObjects().filter((obj: any) => obj.setColor?.(hexColor));\n }\n\n colorizeSelectedMarkups(r: number, g: number, b: number): void {\n const hexColor = new MarkupColor(r, g, b).asHex();\n this.getSelectedObjects().filter((obj: any) => obj.setColor?.(hexColor));\n }\n\n setViewpoint(viewpoint: IViewpoint): void {\n this.clearSelected();\n this.removeTextInput();\n this.removeImageInput();\n this._konvaStage.scale({ x: 1, y: 1 });\n this._konvaStage.position({ x: 0, y: 0 });\n\n const markupColor = viewpoint.custom_fields?.markup_color || { r: 255, g: 0, b: 0 };\n this.setMarkupColor(markupColor.r, markupColor.g, markupColor.b);\n\n viewpoint.lines?.forEach((line: ILine) => {\n const linePoints = [];\n line.points.forEach((point) => {\n const screenPoint = this._worldTransformer.worldToScreen(point);\n linePoints.push(screenPoint.x);\n linePoints.push(screenPoint.y);\n });\n this.addLine(linePoints, line.color, line.type as MarkupLineType, line.width, line.id);\n });\n\n viewpoint.texts?.forEach((text: IText) => {\n const screenPoint = this._worldTransformer.worldToScreen(text.position);\n this.addText(text.text, screenPoint, text.angle, text.color, text.text_size, text.font_size, text.id);\n });\n\n viewpoint.rectangles?.forEach((rect: IRectangle) => {\n const screenPoint = this._worldTransformer.worldToScreen(rect.position);\n const screenPoint2 = rect.position2 ? this._worldTransformer.worldToScreen(rect.position2) : null;\n this.addRectangle(screenPoint, screenPoint2, rect.width, rect.height, rect.line_width, rect.color, rect.id);\n });\n\n viewpoint.ellipses?.forEach((ellipse: IEllipse) => {\n const screenPoint = this._worldTransformer.worldToScreen(ellipse.position);\n const screenPoint2 = ellipse.position2 ? this._worldTransformer.worldToScreen(ellipse.position2) : null;\n const screenPoint3 = ellipse.position3 ? this._worldTransformer.worldToScreen(ellipse.position3) : null;\n this.addEllipse(\n screenPoint,\n screenPoint2,\n screenPoint3,\n ellipse.radius,\n ellipse.line_width,\n ellipse.color,\n ellipse.id\n );\n });\n\n viewpoint.arrows?.forEach((arrow: IArrow) => {\n const startPoint = this._worldTransformer.worldToScreen(arrow.start);\n const endPoint = this._worldTransformer.worldToScreen(arrow.end);\n this.addArrow(startPoint, endPoint, arrow.color, arrow.id);\n });\n\n viewpoint.clouds?.forEach((cloud: ICloud) => {\n const screenPoint = this._worldTransformer.worldToScreen(cloud.position);\n const screenPoint2 = cloud.position2 ? this._worldTransformer.worldToScreen(cloud.position2) : null;\n this.addCloud(screenPoint, screenPoint2, cloud.width, cloud.height, cloud.line_width, cloud.color, cloud.id);\n });\n\n viewpoint.images?.forEach((image: IImage) => {\n const screenPoint = this._worldTransformer.worldToScreen(image.position);\n const screenPoint2 = image.position2 ? this._worldTransformer.worldToScreen(image.position2) : null;\n this.addImage(screenPoint, screenPoint2, image.src, image.width, image.height, image.id);\n });\n }\n\n getViewpoint(viewpoint: IViewpoint): IViewpoint {\n if (!viewpoint) viewpoint = {};\n\n viewpoint.lines = this.getMarkupLines();\n viewpoint.texts = this.getMarkupTexts();\n viewpoint.arrows = this.getMarkupArrows();\n viewpoint.clouds = this.getMarkupClouds();\n viewpoint.ellipses = this.getMarkupEllipses();\n viewpoint.images = this.getMarkupImages();\n viewpoint.rectangles = this.getMarkupRectangles();\n\n viewpoint.custom_fields = { markup_color: this.getMarkupColor() };\n viewpoint.snapshot = { data: this.combineMarkupWithDrawing() };\n\n return viewpoint;\n }\n\n enableEditMode(mode: MarkupMode | false): this {\n if (!mode || !MarkupMode2Konva[mode]) {\n this.clearSelected();\n this.removeTextInput();\n this.removeImageInput();\n this._markupContainer.style.pointerEvents = \"none\";\n this._markupIsActive = false;\n } else {\n this._markupMode = mode;\n this._markupContainer.style.pointerEvents = \"all\";\n this._markupIsActive = true;\n }\n return this;\n }\n\n createObject(type: string, params: any): IMarkupObject {\n const konvaShape = MarkupMode2Konva[type];\n if (!konvaShape || !konvaShape.initializer)\n throw new Error(`Markup CreateObject - unsupported markup type ${type}`);\n\n const object = konvaShape.initializer(null, params, this._worldTransformer);\n this.addObject(object);\n\n return object;\n }\n\n getObjects(): IMarkupObject[] {\n const objects = [];\n Object.keys(MarkupMode2Konva).forEach((type) => {\n const konvaShape = MarkupMode2Konva[type];\n this.konvaLayerFind(type).forEach((ref) =>\n objects.push(konvaShape.initializer(ref, null, this._worldTransformer))\n );\n });\n return objects;\n }\n\n getSelectedObjects(): IMarkupObject[] {\n if (!this._konvaTransformer) return [];\n\n return this._konvaTransformer\n .nodes()\n .map((ref) => {\n const name = ref.className;\n const konvaShape = Object.values(MarkupMode2Konva).find((shape) => shape.name === name);\n return konvaShape ? konvaShape.initializer(ref, null, this._worldTransformer) : null;\n })\n .filter((x) => x);\n }\n\n selectObjects(objects: IMarkupObject[]) {\n if (!this._konvaTransformer) return;\n\n const selectedObjs = this._konvaTransformer.nodes().concat(objects.map((x) => x.ref()));\n this._konvaTransformer.nodes(selectedObjs);\n }\n\n clearSelected(): void {\n if (this._konvaTransformer) this._konvaTransformer.nodes([]);\n }\n\n private addObject(object: IMarkupObject): void {\n if (object.type() === \"Image\") this._groupImages.add(object.ref());\n else if (object.type() === \"Text\") this._groupTexts.add(object.ref());\n else this._groupGeometry.add(object.ref());\n }\n\n private konvaLayerFind(type: string): any {\n if (!this._konvaLayer) return [];\n\n const konvaShape = MarkupMode2Konva[type];\n if (!konvaShape || !konvaShape.initializer) return [];\n\n // for \"draggable\" Konva uses Rectangles in Transformer. We need only Shapes from layer.\n return this._konvaLayer\n .find(konvaShape.name)\n .filter(\n (ref) =>\n ref.parent === this._konvaLayer ||\n ref.parent === this._groupImages ||\n ref.parent === this._groupGeometry ||\n ref.parent === this._groupTexts\n );\n }\n\n private getRelativePointPosition = (point, node) => {\n // the function will return pointer position relative to the passed node\n const transform = node.getAbsoluteTransform().copy();\n // to detect relative position we need to invert transform\n transform.invert();\n // get pointer (say mouse or touch) position\n // now we find relative point\n return transform.point(point);\n };\n\n private getRelativePointerPosition = (node) => {\n return this.getRelativePointPosition(node.getStage().getPointerPosition(), node);\n };\n\n private initializeKonva(): any {\n // first we need Konva core things: stage and layer\n const stage = new Konva.Stage({\n container: this._markupContainer,\n width: this._container.clientWidth,\n height: this._container.clientHeight,\n });\n this._konvaStage = stage;\n\n const layer = new Konva.Layer({ pixelRation: window.devicePixelRatio });\n stage.add(layer);\n\n this._groupImages = new Konva.Group();\n layer.add(this._groupImages);\n this._groupGeometry = new Konva.Group();\n layer.add(this._groupGeometry);\n this._groupTexts = new Konva.Group();\n layer.add(this._groupTexts);\n\n this._konvaLayer = layer;\n\n const transformer = new Konva.Transformer({\n shouldOverdrawWholeArea: false,\n keepRatio: false,\n flipEnabled: false,\n });\n layer.add(transformer);\n this._konvaTransformer = transformer;\n\n let isPaint = false;\n let lastLine;\n let mouseDownPos;\n let lastObj;\n\n stage.on(\"mousedown touchstart\", (e) => {\n // do nothing if we mousedown on any shape\n if (!this._markupIsActive || e.target !== stage || this._markupMode === \"Text\" || this._markupMode === \"Image\")\n return;\n\n if (e.target === stage && transformer.nodes().length > 0) {\n transformer.nodes([]);\n return;\n }\n\n const pos = this.getRelativePointerPosition(stage);\n mouseDownPos = pos;\n\n isPaint = [\"Arrow\", \"Cloud\", \"Ellipse\", \"Line\", \"Rectangle\"].some((m) => m === this._markupMode);\n if (this._markupMode === \"Line\") {\n // add point twice, so we have some drawings even on a simple click\n lastLine = this.addLine([pos.x, pos.y, pos.x, pos.y]);\n }\n });\n\n stage.on(\"mouseup touchend\", () => {\n if (!this._markupIsActive) return;\n\n if (isPaint) {\n const pos = this.getRelativePointerPosition(stage);\n const defParams = mouseDownPos && pos.x === mouseDownPos.x && pos.y === mouseDownPos.y;\n const startX = defParams ? mouseDownPos.x : Math.min(mouseDownPos.x, pos.x);\n const startY = defParams ? mouseDownPos.y : Math.min(mouseDownPos.y, pos.y);\n const dX = defParams ? 200 : Math.abs(mouseDownPos.x - pos.x);\n const dY = defParams ? 200 : Math.abs(mouseDownPos.y - pos.y);\n if (defParams) {\n if (this._markupMode === \"Rectangle\") {\n this.addRectangle({ x: startX, y: startY }, null, dX, dY);\n } else if (this._markupMode === \"Ellipse\") {\n this.addEllipse({ x: startX, y: startY }, null, null, { x: dX / 2, y: dY / 2 });\n } else if (this._markupMode === \"Arrow\") {\n this.addArrow(\n { x: mouseDownPos.x, y: mouseDownPos.y },\n { x: defParams ? mouseDownPos.x + 200 : pos.x, y: defParams ? startY : pos.y }\n );\n } else if (this._markupMode === \"Cloud\") {\n this.addCloud({ x: startX, y: startY }, null, Math.max(100, dX), Math.max(100, dY));\n }\n }\n }\n\n lastObj = undefined;\n isPaint = false;\n });\n\n stage.on(\"mousemove touchmove\", () => {\n if (!this._markupIsActive) return;\n if (!isPaint) {\n return;\n }\n\n // prevent scrolling on touch devices\n //e.evt.preventDefault();\n\n const pos = this.getRelativePointerPosition(stage);\n const defParams = mouseDownPos && pos.x === mouseDownPos.x && pos.y === mouseDownPos.y;\n const startX = defParams ? mouseDownPos.x : Math.min(mouseDownPos.x, pos.x);\n const startY = defParams ? mouseDownPos.y : Math.min(mouseDownPos.y, pos.y);\n const dX = defParams ? 200 : Math.abs(mouseDownPos.x - pos.x);\n const dY = defParams ? 200 : Math.abs(mouseDownPos.y - pos.y);\n\n if (this._markupMode === \"Line\") {\n lastLine.addPoints([{ x: pos.x, y: pos.y }]);\n } else if (this._markupMode === \"Arrow\") {\n if (lastObj) lastObj.setEndPoint(pos.x, pos.y);\n else lastObj = this.addArrow({ x: mouseDownPos.x, y: mouseDownPos.y }, { x: pos.x, y: pos.y });\n } else if (this._markupMode === \"Rectangle\") {\n if (lastObj) {\n lastObj.setPosition(startX, startY);\n lastObj.setWidth(dX);\n lastObj.setHeight(dY);\n } else lastObj = this.addRectangle({ x: startX, y: startY }, null, dX, dY);\n } else if (this._markupMode === \"Ellipse\") {\n if (lastObj) {\n lastObj.setPosition(startX, startY);\n lastObj.setRadiusX(dX);\n lastObj.setRadiusY(dY);\n } else lastObj = this.addEllipse({ x: startX, y: startY }, null, null, { x: dX, y: dY });\n } else if (this._markupMode === \"Cloud\") {\n if (lastObj) {\n lastObj.setPosition(startX, startY);\n lastObj.setWidth(Math.max(100, dX));\n lastObj.setHeight(Math.max(100, dY));\n } else lastObj = this.addCloud({ x: startX, y: startY }, null, dX, dY);\n }\n });\n\n // clicks should select/deselect shapes\n stage.on(\"click tap\", (e) => {\n if (!this._markupIsActive) return;\n\n // if click on empty area - remove all selections\n if (e.target === stage) {\n if (this._markupMode === \"Text\") {\n if (this._textInputRef && this._textInputRef.value)\n this.addText(this._textInputRef.value, this._textInputPos, this._textInputAngle);\n else if (transformer.nodes().length === 0) {\n const pos = this.getRelativePointerPosition(stage);\n this.createTextInput(pos, e.evt.pageX, e.evt.pageY, 0, null);\n }\n } else if (this._markupMode === \"Image\") {\n if (this._imageInputRef && this._imageInputRef.value)\n this.addImage(\n { x: this._imageInputPos.x, y: this._imageInputPos.y },\n null,\n this._imageInputRef.value,\n 0,\n 0,\n this._imageInputRef.value\n );\n else if (transformer.nodes().length === 0) {\n const pos = this.getRelativePointerPosition(stage);\n this.createImageInput(pos);\n }\n }\n transformer.nodes([]);\n return;\n }\n\n if (this._markupMode === \"Text\" || this._markupMode === \"SelectMarkup\") {\n if (e.target.className === \"Text\" && transformer.nodes().length === 1 && transformer.nodes()[0] === e.target) {\n if (this._textInputRef && this._textInputRef.value)\n this.addText(this._textInputRef.value, this._textInputPos, this._textInputAngle);\n else\n this.createTextInput(\n { x: e.target.attrs.x, y: e.target.attrs.y },\n e.evt.pageX,\n e.evt.pageY,\n e.target.attrs.rotation,\n e.target.attrs.text\n );\n return;\n } else {\n this.removeTextInput();\n }\n }\n\n if (this._markupMode === \"Image\" || this._markupMode === \"SelectMarkup\") {\n if (e.target.className === \"Image\" && transformer.nodes().length === 1 && transformer.nodes()[0] === e.target) {\n if (this._imageInputRef && this._imageInputRef.value)\n this.addImage(this._imageInputPos, null, this._imageInputRef.value, 0, 0);\n else this.createImageInput({ x: e.target.attrs.x, y: e.target.attrs.y });\n return;\n } else {\n this.removeImageInput();\n }\n }\n\n if (\n transformer.nodes().filter((x) => x.className === \"Cloud\" || x.className === \"Image\").length > 0 ||\n e.target.className === \"Cloud\" ||\n e.target.className === \"Image\"\n ) {\n transformer.rotateEnabled(false);\n } else {\n transformer.rotateEnabled(true);\n }\n\n // do we pressed shift or ctrl?\n const metaPressed = e.evt.shiftKey || e.evt.ctrlKey || e.evt.metaKey;\n const isSelected = transformer.nodes().indexOf(e.target) >= 0;\n\n if (!metaPressed && !isSelected) {\n // if no key pressed and the node is not selected\n // select just one\n transformer.nodes([e.target]);\n } else if (metaPressed && isSelected) {\n // if we pressed keys and node was selected\n // we need to remove it from selection:\n const nodes = transformer.nodes().slice(); // use slice to have new copy of array\n // remove node from array\n nodes.splice(nodes.indexOf(e.target), 1);\n transformer.nodes(nodes);\n } else if (metaPressed && !isSelected) {\n // add the node into selection\n const nodes = transformer.nodes().concat([e.target]);\n transformer.nodes(nodes);\n }\n });\n\n const container = stage.container();\n container.tabIndex = 1;\n // focus it\n // also stage will be in focus on its click\n container.focus();\n\n container.addEventListener(\"keydown\", (e) => {\n if (!this._markupIsActive) return;\n if (e.code === \"Delete\") {\n this.getSelectedObjects().forEach((obj: IMarkupObject) => obj.delete());\n this.clearSelected();\n return;\n }\n e.preventDefault();\n });\n }\n\n private destroyKonva() {\n this.removeTextInput();\n this.removeImageInput();\n this.clearOverlay();\n\n this._konvaStage?.destroy();\n\n this._groupImages = undefined;\n this._groupGeometry = undefined;\n this._groupTexts = undefined;\n this._konvaLayer = undefined;\n this._konvaTransformer = undefined;\n this._konvaStage = undefined;\n }\n\n private getMarkupLines(): Array<ILine> {\n const lines = [];\n\n this.konvaLayerFind(\"Line\").forEach((ref) => {\n const wcsPoints = ref.getAttr(\"wcsPoints\");\n if (!wcsPoints) return;\n\n const konvaLine = new KonvaLine(null, ref, this._worldTransformer);\n const line: ILine = {\n id: konvaLine.id(),\n points: wcsPoints,\n color: konvaLine.getColor() || \"#ff0000\",\n type: konvaLine.getLineType() || this.lineType,\n width: konvaLine.getLineWidth() || this.lineWidth,\n };\n\n lines.push(line);\n });\n\n return lines;\n }\n\n private getMarkupTexts(): Array<IText> {\n const texts = [];\n\n this.konvaLayerFind(\"Text\").forEach((ref) => {\n const textSize = 0.02;\n const textScale = this._worldTransformer.getScale();\n\n const wcsPosition = ref.getAttr(\"wcsStart\");\n const stageAbsoluteTransform = this._konvaStage.getAbsoluteTransform();\n\n const shape = new KonvaText(null, ref, this._worldTransformer);\n const text: IText = {\n id: shape.id(),\n position: wcsPosition,\n text: shape.getText(),\n text_size: textSize * textScale.y,\n angle: shape.getRotation(),\n color: shape.getColor(),\n font_size: shape.getFontSize() * stageAbsoluteTransform.getMatrix()[0],\n };\n\n texts.push(text);\n });\n\n return texts;\n }\n\n private getMarkupRectangles(): Array<IRectangle> {\n const rectangles = [];\n\n this.konvaLayerFind(\"Rectangle\").forEach((ref) => {\n const wcsStart = ref.getAttr(\"wcsStart\");\n const wcsEnd = ref.getAttr(\"wcsEnd\");\n const screenStart = this._worldTransformer.worldToScreen(wcsStart);\n const screenEnd = this._worldTransformer.worldToScreen(wcsEnd);\n\n const shape = new KonvaRectangle(null, ref, this._worldTransformer);\n const rectangle: IRectangle = {\n id: shape.id(),\n position: wcsStart,\n position2: wcsEnd,\n width: Math.abs(screenStart.x - screenEnd.x),\n height: Math.abs(screenStart.y - screenEnd.y),\n line_width: shape.getLineWidth(),\n color: shape.getColor(),\n };\n\n rectangles.push(rectangle);\n });\n\n return rectangles;\n }\n\n private getMarkupEllipses(): Array<IEllipse> {\n const ellipses = [];\n\n this.konvaLayerFind(\"Ellipse\").forEach((ref) => {\n const wcsPosition = ref.getAttr(\"wcsPosition\");\n const wcsPosition2 = ref.getAttr(\"wcsRadiusX\");\n const wcsPosition3 = ref.getAttr(\"wcsRadiusY\");\n const stageAbsoluteTransform = this._konvaStage.getAbsoluteTransform();\n const scale = stageAbsoluteTransform.getMatrix()[0];\n\n const shape = new KonvaEllipse(null, ref, this._worldTransformer);\n const ellipse: IEllipse = {\n id: shape.id(),\n position: wcsPosition,\n position2: wcsPosition2,\n position3: wcsPosition3,\n radius: {\n x: ref.getRadiusX() * scale,\n y: ref.getRadiusY() * scale,\n },\n line_width: shape.getLineWidth(),\n color: shape.getColor(),\n };\n\n ellipses.push(ellipse);\n });\n\n return ellipses;\n }\n\n private getMarkupArrows(): Array<IArrow> {\n const arrows = [];\n\n this.konvaLayerFind(\"Arrow\").forEach((ref) => {\n // we need getAbsoluteTransform because inside Konva position starts from {0, 0}\n const wcsStart = ref.getAttr(\"wcsStart\");\n const wcsEnd = ref.getAttr(\"wcsEnd\");\n\n const shape = new KonvaArrow(null, ref, this._worldTransformer);\n const arrow: IArrow = {\n id: shape.id(),\n start: wcsStart,\n end: wcsEnd,\n color: shape.getColor(),\n };\n\n arrows.push(arrow);\n });\n\n return arrows;\n }\n\n private getMarkupImages(): Array<IImage> {\n const images = [];\n\n this.konvaLayerFind(\"Image\").forEach((ref) => {\n const wcsStart = ref.getAttr(\"wcsStart\");\n const wcsEnd = ref.getAttr(\"wcsEnd\");\n const stageAbsoluteTransform = this._konvaStage.getAbsoluteTransform();\n const scale = stageAbsoluteTransform.getMatrix()[0];\n\n const shape = new KonvaImage(null, ref, this._worldTransformer);\n const image: IImage = {\n id: shape.id(),\n position: wcsStart,\n position2: wcsEnd,\n src: shape.getSrc(),\n width: shape.getWidth() * scale,\n height: shape.getHeight() * scale,\n };\n\n images.push(image);\n });\n\n return images;\n }\n\n private getMarkupClouds(): Array<ICloud> {\n const clouds = [];\n\n this.konvaLayerFind(\"Cloud\").forEach((ref) => {\n const wcsStart = ref.getAttr(\"wcsStart\");\n const wcsEnd = ref.getAttr(\"wcsEnd\");\n const screenStart = this._worldTransformer.worldToScreen(wcsStart);\n const screenEnd = this._worldTransformer.worldToScreen(wcsEnd);\n\n const shape = new KonvaCloud(null, ref, this._worldTransformer);\n const cloud: ICloud = {\n id: shape.id(),\n position: wcsStart,\n position2: wcsEnd,\n width: Math.abs(screenStart.x - screenEnd.x),\n height: Math.abs(screenStart.y - screenEnd.y),\n line_width: shape.getLineWidth(),\n color: shape.getColor(),\n };\n\n clouds.push(cloud);\n });\n\n return clouds;\n }\n\n private combineMarkupWithDrawing() {\n this.clearSelected();\n\n const tempCanvas = document.createElement(\"canvas\");\n if (this._konvaStage) {\n tempCanvas.width = this._konvaStage.width();\n tempCanvas.height = this._konvaStage.height();\n\n const ctx = tempCanvas.getContext(\"2d\");\n if (this._container instanceof HTMLCanvasElement) ctx.drawImage(this._container, 0, 0);\n ctx.drawImage(this._konvaStage.toCanvas({ pixelRatio: window.devicePixelRatio }), 0, 0);\n }\n\n return tempCanvas.toDataURL(\"image/jpeg\", 0.25);\n }\n\n private addLine(\n linePoints: number[],\n color?: string,\n type?: MarkupLineType,\n width?: number,\n id?: string\n ): KonvaLine | void {\n if (!linePoints || linePoints.length === 0) return;\n\n const points: { x: number; y: number }[] = [];\n for (let i = 0; i < linePoints.length; i += 2) {\n points.push({ x: linePoints[i], y: linePoints[i + 1] });\n }\n\n const konvaLine = new KonvaLine(\n {\n points,\n type: type || this.lineType,\n width: width || this.lineWidth,\n color: color || this._markupColor.asHex(),\n id,\n },\n null,\n this._worldTransformer\n );\n\n this.addObject(konvaLine);\n return konvaLine;\n }\n\n private createTextInput(pos: Konva.Vector2d, inputX: number, inputY: number, angle: number, text: string): void {\n if (!this._textInputRef) {\n this._textInputPos = pos;\n this._textInputAngle = angle;\n this._textInputRef = document.createElement(\"textarea\");\n this._textInputRef.style.zIndex = \"9999\";\n this._textInputRef.style.position = \"absolute\";\n this._textInputRef.style.display = \"block\";\n this._textInputRef.style.top = inputY + \"px\";\n this._textInputRef.style.left = inputX + \"px\";\n this._textInputRef.style.fontSize = `${this.fontSize}px`;\n this._textInputRef.style.color = `${this._markupColor.asHex()}`;\n this._textInputRef.style.fontFamily = \"Calibri\";\n\n this._textInputRef.onkeydown = (event) => {\n if (event.key === \"Enter\" && !event.shiftKey) {\n event.preventDefault();\n this.addText(this._textInputRef.value, this._textInputPos, this._textInputAngle);\n }\n if (event.key === \"Escape\") {\n event.preventDefault();\n this.removeTextInput();\n }\n };\n if (text) this._textInputRef.value = text;\n document.body.appendChild(this._textInputRef);\n\n setTimeout(() => {\n this._textInputRef.focus();\n }, 50);\n } else {\n this.removeTextInput();\n }\n }\n\n private removeTextInput(): void {\n this._textInputRef?.remove();\n this._textInputRef = null;\n this._textInputPos = null;\n this._textInputAngle = 0;\n }\n\n private createImageInput(pos: Konva.Vector2d): void {\n if (!this._imageInputRef) {\n const convertBase64 = (file) => {\n return new Promise<string | ArrayBuffer>((resolve, reject) => {\n const fileReader = new FileReader();\n fileReader.readAsDataURL(file);\n\n fileReader.onload = () => {\n resolve(fileReader.result);\n };\n\n fileReader.onerror = (error) => {\n reject(error);\n };\n });\n };\n\n this._imageInputPos = pos;\n this._imageInputRef = document.createElement(\"input\");\n this._imageInputRef.style.display = \"none\";\n this._imageInputRef.type = \"file\";\n this._imageInputRef.accept = \"image/png, image/jpeg\";\n this._imageInputRef.onchange = async (event) => {\n const file = (event.target as HTMLInputElement).files[0];\n const base64 = await convertBase64(file);\n this.addImage({ x: this._imageInputPos.x, y: this._imageInputPos.y }, null, base64.toString(), 0, 0);\n };\n this._imageInputRef.oncancel = () => {\n this.removeImageInput();\n };\n document.body.appendChild(this._imageInputRef);\n\n setTimeout(() => {\n this._imageInputRef.click();\n }, 50);\n } else {\n this.removeImageInput();\n }\n }\n\n private removeImageInput(): void {\n this._imageInputRef?.remove();\n this._imageInputRef = null;\n this._imageInputPos = null;\n }\n\n private addText(\n text: string,\n position: Konva.Vector2d,\n angle?: number,\n color?: string,\n textSize?: number,\n fontSize?: number,\n id?: string\n ): KonvaText | void {\n if (!text) return;\n\n // in case of edit - remove old Konva.Text object\n this.getSelectedObjects().shift()?.delete();\n\n this.clearSelected();\n this.removeTextInput();\n\n // in case we have old viewpoint without font_size\n const tolerance = 1.0e-6;\n if (textSize && textSize > tolerance && (!fontSize || fontSize < tolerance)) {\n const size = 0.02;\n const scale = this._worldTransformer.getScale();\n fontSize = textSize / (scale.y / size) / 34;\n }\n\n const konvaText = new KonvaText(\n {\n position: { x: position.x, y: position.y },\n text,\n rotation: angle,\n fontSize: fontSize || this.fontSize,\n color: color || this._markupColor.asHex(),\n id,\n },\n null,\n this._worldTransformer\n );\n\n this.addObject(konvaText);\n return konvaText;\n }\n\n private addRectangle(\n position: Konva.Vector2d,\n position2: Konva.Vector2d,\n width: number,\n height: number,\n lineWidth?: number,\n color?: string,\n id?: string\n ): KonvaRectangle | void {\n if (!position) return;\n\n const konvaRectangle = new KonvaRectangle(\n {\n position,\n position2,\n width,\n height,\n lineWidth: lineWidth || this.lineWidth,\n color: color || this._markupColor.asHex(),\n id,\n },\n null,\n this._worldTransformer\n );\n\n this.addObject(konvaRectangle);\n return konvaRectangle;\n }\n\n private addEllipse(\n position: Konva.Vector2d,\n position2: Konva.Vector2d,\n position3: Konva.Vector2d,\n radius: Konva.Vector2d,\n lineWidth?: number,\n color?: string,\n id?: string\n ): KonvaEllipse | void {\n if (!position) return;\n\n const konvaEllipse = new KonvaEllipse(\n {\n position,\n position2,\n position3,\n radius,\n lineWidth,\n color: color || this._markupColor.asHex(),\n id,\n },\n null,\n this._worldTransformer\n );\n\n this.addObject(konvaEllipse);\n return konvaEllipse;\n }\n\n private addArrow(start: Konva.Vector2d, end: Konva.Vector2d, color?: string, id?: string): KonvaArrow | void {\n if (!start || !end) return;\n\n const konvaArrow = new KonvaArrow(\n {\n start,\n end,\n color: color || this._markupColor.asHex(),\n id,\n },\n null,\n this._worldTransformer\n );\n\n this.addObject(konvaArrow);\n return konvaArrow;\n }\n\n private addCloud(\n position: Konva.Vector2d,\n position2: Konva.Vector2d,\n width: number,\n height: number,\n lineWidth?: number,\n color?: string,\n id?: string\n ): KonvaCloud | void {\n if (!position || !width || !height) return;\n\n const konvaCloud = new KonvaCloud(\n {\n position,\n position2,\n width,\n height,\n color: color || this._markupColor.asHex(),\n lineWidth: lineWidth || this.lineWidth,\n id,\n },\n null,\n this._worldTransformer\n );\n\n this.addObject(konvaCloud);\n return konvaCloud;\n }\n\n private addImage(\n position: Konva.Vector2d,\n position2: Konva.Vector2d,\n src: string,\n width?: number,\n height?: number,\n id?: string\n ): KonvaImage | void {\n if (!position || !src) return;\n\n // in case of edit - remove old Image placeholder object\n this.getSelectedObjects().shift()?.delete();\n\n this.clearSelected();\n this.removeImageInput();\n\n const konvaImage = new KonvaImage(\n {\n position,\n position2,\n src,\n width,\n height,\n maxWidth: this._konvaStage.width() - position.x,\n maxHeight: this._konvaStage.height() - position.y,\n id,\n },\n null,\n this._worldTransformer\n );\n\n this.addObject(konvaImage);\n return konvaImage;\n }\n}\n"],"names":["utils.getDistanceIn2D"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;MAyBa,cAAc,CAAA;AACzB,IAAA,aAAa,CAAC,QAAkC,EAAA;AAC9C,QAAA,OAAO,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;IAC/C;AAEA,IAAA,aAAa,CAAC,QAA6C,EAAA;AACzD,QAAA,OAAO,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE;IACzC;IAEA,QAAQ,GAAA;AACN,QAAA,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;IAC7B;AACD;;MCXY,WAAW,CAAA;AAatB,IAAA,WAAA,CAAY,CAAS,EAAE,CAAS,EAAE,CAAS,EAAA;QACzC,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IACxB;IAMO,KAAK,GAAA;AACV,QAAA,OAAO,GAAG,GAAG,IAAI,CAAC,GAAG;IACvB;IAKO,KAAK,GAAA;AACV,QAAA,OAAO,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE;IAC5C;AASO,IAAA,QAAQ,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS,EAAA;AAC7C,QAAA,IAAI,CAAC,CAAC,GAAG,CAAC;AACV,QAAA,IAAI,CAAC,CAAC,GAAG,CAAC;AACV,QAAA,IAAI,CAAC,CAAC,GAAG,CAAC;AACV,Q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CAAC,SAAS;YACtC,EAAE;AACH,SAAA,EACD,IAAI,EACJ,IAAI,CAAC,iBAAiB,CACvB;AAED,QAAA,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC;AAC1B,QAAA,OAAO,UAAU;IACnB;IAEQ,QAAQ,CACd,QAAwB,EACxB,SAAyB,EACzB,GAAW,EACX,KAAc,EACd,MAAe,EACf,EAAW,EAAA;;AAEX,QAAA,IAAI,CAAC,QAAQ,IAAI,CAAC,GAAG;YAAE;QAGvB,CAAA,EAAA,GAAA,IAAI,CAAC,kBAAkB,EAAE,CAAC,KAAK,EAAE,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,MAAM,EAAE;QAE3C,IAAI,CAAC,aAAa,EAAE;QACpB,IAAI,CAAC,gBAAgB,EAAE;AAEvB,QAAA,MAAM,UAAU,GAAG,IAAI,UAAU,CAC/B;YACE,QAAQ;YACR,SAAS;YACT,GAAG;YACH,KAAK;YACL,MAAM;YACN,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,QAAQ,CAAC,CAAC;YAC/C,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,GAAG,QAAQ,CAAC,CAAC;YACjD,EAAE;AACH,SAAA,EACD,IAAI,EACJ,IAAI,CAAC,iBAAiB,CACvB;AAED,QAAA,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC;AAC1B,QAAA,OAAO,UAAU;IACnB;AACD;;;;"}
1
+ {"version":3,"file":"markup.module.js","sources":["../src/markup/WorldTransform.ts","../src/markup/Konva/MarkupColor.ts","../src/markup/Konva/KonvaLine.ts","../src/markup/Konva/KonvaText.ts","../src/markup/Konva/KonvaRectangle.ts","../src/markup/Utils.ts","../src/markup/Konva/KonvaEllipse.ts","../src/markup/Konva/KonvaArrow.ts","../src/markup/Konva/KonvaImage.ts","../src/markup/Konva/KonvaCloud.ts","../src/markup/Konva/KonvaMarkup.ts"],"sourcesContent":["///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IWorldTransform } from \"./IWorldTransform\";\n\nexport class WorldTransform implements IWorldTransform {\n screenToWorld(position: { x: number; y: number }): { x: number; y: number; z: number } {\n return { x: position.x, y: position.y, z: 0 };\n }\n\n worldToScreen(position: { x: number; y: number; z: number }): { x: number; y: number } {\n return { x: position.x, y: position.y };\n }\n\n getScale(): { x: number; y: number; z: number } {\n return { x: 1, y: 1, z: 1 };\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\n/**\n * Defines the markup color helper object.\n */\nexport class MarkupColor {\n public R: number;\n public G: number;\n public B: number;\n public HEX: string;\n\n /**\n * Creates an instance of the color.\n *\n * @param r - The `red` component of the color, as a number between 0 and 255.\n * @param g - The `green` component of the color, as a number between 0 and 255.\n * @param b - The `blue` component of the color, as a number between 0 and 255.\n */\n constructor(r: number, g: number, b: number) {\n this.setColor(r, g, b);\n }\n\n /**\n * Returns the color as a string in hexadecimal color syntax `#RGB` using its primary color components\n * (red, green, blue) written as hexadecimal numbers.\n */\n public asHex(): string {\n return \"#\" + this.HEX;\n }\n\n /**\n * Returns the color as an {r, g, b} object.\n */\n public asRGB(): { r: number; g: number; b: number } {\n return { r: this.R, g: this.G, b: this.B };\n }\n\n /**\n * Sets the color.\n *\n * @param r - The `red` component of the color, as a number between 0 and 255.\n * @param g - The `green` component of the color, as a number between 0 and 255.\n * @param b - The `blue` component of the color, as a number between 0 and 255.\n */\n public setColor(r: number, g: number, b: number): void {\n this.R = r;\n this.G = g;\n this.B = b;\n this.HEX = this.rgbToHex(r, g, b);\n }\n\n private rgbToHex(r: number, g: number, b: number): string {\n const valueToHex = (c: number) => {\n const hex = c.toString(16);\n return hex === \"0\" ? \"00\" : hex;\n };\n\n return valueToHex(r) + valueToHex(g) + valueToHex(b);\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport Konva from \"konva\";\nimport { IMarkupLine, IMarkupLineParams, MarkupLineType } from \"../IMarkupLine\";\nimport { IWorldTransform } from \"../IWorldTransform\";\nimport { WorldTransform } from \"../WorldTransform\";\n\nconst LineTypeSpecs = new Map<string, number[]>([\n [\"solid\", []],\n [\"dot\", [30, 30, 0.001, 30]],\n [\"dash\", [30, 30]],\n]);\n\nexport class KonvaLine implements IMarkupLine {\n private _ref: Konva.Line;\n private _worldTransformer: IWorldTransform;\n\n constructor(params: IMarkupLineParams, ref = null, worldTransformer = new WorldTransform()) {\n this._worldTransformer = worldTransformer;\n\n if (ref) {\n this._ref = ref;\n let wcsPoints = this._ref.getAttr(\"wcsPoints\");\n if (!wcsPoints) {\n wcsPoints = [];\n const points = this._ref.points();\n let wcsPoint;\n for (let i = 0; i < points.length; i += 2) {\n wcsPoint = this._worldTransformer.screenToWorld({ x: points[i], y: points[i + 1] });\n wcsPoints.push({ x: wcsPoint.x, y: wcsPoint.y, z: wcsPoint.z });\n }\n this._ref.setAttr(\"wcsPoints\", wcsPoints);\n }\n return;\n }\n\n if (!params) params = {};\n if (!params.points)\n params.points = [\n { x: 0, y: 0 },\n { x: 100, y: 100 },\n ];\n\n const konvaPoints = [];\n const wcsPoints = [];\n params.points.forEach((point) => {\n konvaPoints.push(point.x, point.y);\n const wcsPoint = this._worldTransformer.screenToWorld({ x: point.x, y: point.y });\n wcsPoints.push({ x: wcsPoint.x, y: wcsPoint.y, z: wcsPoint.z });\n });\n\n this._ref = new Konva.Line({\n stroke: params.color ?? \"#ff0000\",\n strokeWidth: params.width ?? 4,\n globalCompositeOperation: \"source-over\",\n lineCap: \"round\",\n lineJoin: \"round\",\n points: konvaPoints,\n draggable: true,\n strokeScaleEnabled: false,\n dash: LineTypeSpecs.get(params.type) || [],\n });\n\n this._ref.setAttr(\"wcsPoints\", wcsPoints);\n\n this._ref.on(\"transform\", (e) => {\n const attrs = e.target.attrs;\n\n if (attrs.rotation !== this._ref.rotation()) this._ref.rotation(attrs.rotation);\n });\n\n this._ref.on(\"transformend\", () => {\n const absoluteTransform = this._ref.getAbsoluteTransform();\n\n const wcsPoints = [];\n const points = this._ref.points();\n let wcsPoint;\n for (let i = 0; i < points.length; i += 2) {\n const position = absoluteTransform.point({ x: points[i], y: points[i + 1] });\n wcsPoint = this._worldTransformer.screenToWorld({ x: position.x, y: position.y });\n wcsPoints.push({ x: wcsPoint.x, y: wcsPoint.y, z: wcsPoint.z });\n }\n this._ref.setAttr(\"wcsPoints\", wcsPoints);\n });\n\n this._ref.on(\"dragend\", () => {\n const absoluteTransform = this._ref.getAbsoluteTransform();\n\n const wcsPoints = [];\n const points = this._ref.points();\n let wcsPoint;\n for (let i = 0; i < points.length; i += 2) {\n const position = absoluteTransform.point({ x: points[i], y: points[i + 1] });\n wcsPoint = this._worldTransformer.screenToWorld({ x: position.x, y: position.y });\n wcsPoints.push({ x: wcsPoint.x, y: wcsPoint.y, z: wcsPoint.z });\n }\n this._ref.setAttr(\"wcsPoints\", wcsPoints);\n });\n\n this._ref.id(this._ref._id.toString());\n }\n\n ref() {\n return this._ref;\n }\n\n id(): string {\n return this._ref.id();\n }\n\n enableMouseEditing(value: boolean): void {\n this._ref.draggable(value);\n }\n\n type(): string {\n return \"Line\";\n }\n\n getColor(): string {\n return this._ref.stroke() as string;\n }\n\n setColor(hex: string) {\n this._ref.stroke(hex);\n }\n\n getRotation(): number {\n return this._ref.rotation();\n }\n\n setRotation(degrees: number): void {\n this._ref.rotation(degrees);\n }\n\n getZIndex(): number {\n return this._ref.zIndex();\n }\n\n setZIndex(zIndex: number): void {\n this._ref.zIndex(zIndex);\n }\n\n delete(): void {\n this._ref.destroy();\n this._ref = null;\n }\n\n getPoints(): number[] {\n return this._ref.points();\n }\n\n setLineWidth(size: number) {\n this._ref.strokeWidth(size);\n }\n\n getLineWidth(): number {\n return this._ref.strokeWidth();\n }\n\n getLineType(): string {\n const typeSpecs = this._ref.dash() || [];\n let type: MarkupLineType;\n switch (typeSpecs) {\n case LineTypeSpecs.get(\"dot\"):\n type = \"dot\";\n break;\n case LineTypeSpecs.get(\"dash\"):\n type = \"dash\";\n break;\n default:\n type = \"solid\";\n break;\n }\n return type;\n }\n\n setLineType(type: string) {\n const specs = LineTypeSpecs.get(type);\n if (specs) this._ref.dash(specs);\n }\n\n addPoints(points: [{ x: number; y: number }]) {\n let newPoints = this._ref.points();\n const wcsPoints = this._ref.getAttr(\"wcsPoints\");\n points.forEach((point) => {\n newPoints = newPoints.concat([point.x, point.y]);\n const wcsPoint = this._worldTransformer.screenToWorld(point);\n wcsPoints.push(wcsPoint);\n });\n\n this._ref.points(newPoints);\n }\n\n updateScreenCoordinates(): void {\n const wcsPoints = this._ref.getAttr(\"wcsPoints\");\n const points = [];\n let invert = this._ref.getAbsoluteTransform().copy();\n invert = invert.invert();\n wcsPoints.forEach((point) => {\n let screenPoint = this._worldTransformer.worldToScreen(point);\n screenPoint = invert.point({ x: screenPoint.x, y: screenPoint.y });\n points.push(screenPoint.x);\n points.push(screenPoint.y);\n });\n\n this._ref.points([]);\n this._ref.points(points);\n this._ref.clearCache();\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport Konva from \"konva\";\nimport { IMarkupText, IMarkupTextParams } from \"../IMarkupText\";\nimport { IWorldTransform } from \"../IWorldTransform\";\nimport { WorldTransform } from \"../WorldTransform\";\n\nexport class KonvaText implements IMarkupText {\n private _ref: Konva.Text;\n private _worldTransformer: IWorldTransform;\n private readonly TEXT_FONT_FAMILY = \"Calibri\";\n\n constructor(params: IMarkupTextParams, ref = null, worldTransformer = new WorldTransform()) {\n this._worldTransformer = worldTransformer;\n\n if (ref) {\n this._ref = ref;\n const wcsStart = this._ref.getAttr(\"wcsStart\");\n if (!wcsStart) {\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x: ref.x(), y: ref.y() }));\n }\n return;\n }\n\n if (!params) params = {};\n if (!params.position) params.position = { x: 0, y: 0 };\n if (!params.text) params.text = \"default\";\n\n this._ref = new Konva.Text({\n x: params.position.x,\n y: params.position.y,\n text: params.text,\n fontSize: params.fontSize ?? 34,\n fontFamily: this.TEXT_FONT_FAMILY,\n fill: params.color ?? \"#ff0000\",\n align: \"left\",\n draggable: true,\n rotation: params.rotation ?? 0,\n });\n\n this._ref.width(this._ref.getTextWidth());\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x: params.position.x, y: params.position.y }));\n\n this._ref.on(\"transform\", (e) => {\n const attrs = e.target.attrs;\n\n if (attrs.rotation !== this._ref.rotation()) this._ref.rotation(attrs.rotation);\n\n const scaleByX = Math.abs(attrs.scaleX - 1) > 10e-6;\n const scaleByY = Math.abs(attrs.scaleY - 1) > 10e-6;\n\n let newWidth = this._ref.width();\n if (scaleByX) newWidth *= attrs.scaleX;\n let newHeight = this._ref.height();\n if (scaleByY) newHeight *= attrs.scaleY;\n\n const minWidth = 50;\n\n if (newWidth < minWidth) newWidth = minWidth;\n if (newHeight < Math.round(this.getFontSize())) newHeight = Math.round(this.getFontSize());\n\n if (scaleByX) {\n this._ref.width(newWidth);\n }\n\n if (scaleByY) {\n this._ref.height(newHeight);\n }\n\n this._ref.scale({ x: 1, y: 1 });\n });\n\n this._ref.on(\"transformend\", (e) => {\n const attrs = e.target.attrs;\n if (attrs.rotation !== this._ref.rotation()) this._ref.rotation(attrs.rotation);\n\n const absoluteTransform = this._ref.getStage().getAbsoluteTransform();\n const position = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() });\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld(position));\n });\n\n this._ref.on(\"dragend\", () => {\n const absoluteTransform = this._ref.getStage().getAbsoluteTransform();\n const position = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() });\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld(position));\n });\n\n this._ref.id(this._ref._id.toString());\n }\n\n ref() {\n return this._ref;\n }\n\n id(): string {\n return this._ref.id();\n }\n\n enableMouseEditing(value: boolean): void {\n this._ref.draggable(value);\n }\n\n type(): string {\n return \"Text\";\n }\n\n getColor(): string {\n return this._ref.fill() as string;\n }\n\n setColor(hex: string): void {\n this._ref.fill(hex);\n }\n\n getRotation(): number {\n return this._ref.rotation();\n }\n\n setRotation(degrees: number): void {\n this._ref.rotation(degrees);\n }\n\n getZIndex(): number {\n return this._ref.zIndex();\n }\n\n setZIndex(zIndex: number): void {\n this._ref.zIndex(zIndex);\n }\n\n delete(): void {\n this._ref.destroy();\n this._ref = null;\n }\n\n getText(): string {\n return this._ref.text();\n }\n\n setText(text: string): void {\n this._ref.text(text);\n }\n\n getPosition(): { x: number; y: number } {\n return this._ref.getPosition();\n }\n\n setPosition(x: number, y: number): void {\n this._ref.setPosition({ x, y });\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x, y }));\n }\n\n getFontSize(): number {\n return this._ref.fontSize();\n }\n\n setFontSize(size: number): void {\n this._ref.fontSize(size);\n }\n\n updateScreenCoordinates(): void {\n const screenPositionStart = this._worldTransformer.worldToScreen(this._ref.getAttr(\"wcsStart\"));\n\n let invert = this._ref.getStage().getAbsoluteTransform().copy();\n invert = invert.invert();\n const positionStart = invert.point(screenPositionStart);\n\n this._ref.position({ x: positionStart.x, y: positionStart.y });\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport Konva from \"konva\";\nimport { IMarkupRectangle, IMarkupRectangleParams } from \"../IMarkupRectangle\";\nimport { IWorldTransform } from \"../IWorldTransform\";\nimport { WorldTransform } from \"../WorldTransform\";\n\nexport class KonvaRectangle implements IMarkupRectangle {\n private _ref: Konva.Rect;\n private _worldTransformer: IWorldTransform;\n\n constructor(params: IMarkupRectangleParams, ref = null, worldTransformer = new WorldTransform()) {\n this._worldTransformer = worldTransformer;\n\n if (ref) {\n this._ref = ref;\n const wcsStart = this._ref.getAttr(\"wcsStart\");\n const wcsEnd = this._ref.getAttr(\"wcsEnd\");\n\n if (!wcsStart) {\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x: ref.x(), y: ref.y() }));\n }\n if (!wcsEnd) {\n const rightBottomPoint = { x: ref.x() + ref.width(), y: ref.y() + ref.height() };\n this._ref.setAttr(\n \"wcsEnd\",\n this._worldTransformer.screenToWorld({ x: rightBottomPoint.x, y: rightBottomPoint.y })\n );\n }\n return;\n }\n\n if (!params) params = {};\n if (!params.position) params.position = { x: 0, y: 0 };\n if (params.position2) {\n params.width = params.position2.x - params.position.x;\n params.height = params.position2.y - params.position.y;\n } else {\n if (!params.width || !params.height) {\n params.position2 = { x: 200, y: 200 };\n params.width = 200;\n params.height = 200;\n } else {\n params.position2 = { x: params.position.x + params.width, y: params.position.y + params.height };\n }\n }\n\n this._ref = new Konva.Rect({\n stroke: params.color ?? \"#ff0000\",\n strokeWidth: params.lineWidth ?? 4,\n globalCompositeOperation: \"source-over\",\n lineCap: \"round\",\n lineJoin: \"round\",\n x: params.position.x,\n y: params.position.y,\n width: params.width ?? 200,\n height: params.height ?? 200,\n draggable: true,\n strokeScaleEnabled: false,\n });\n\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x: params.position.x, y: params.position.y }));\n this._ref.setAttr(\"wcsEnd\", this._worldTransformer.screenToWorld({ x: params.position2.x, y: params.position2.y }));\n\n this._ref.on(\"transform\", (e) => {\n const attrs = e.target.attrs;\n const scaleByX = Math.abs(attrs.scaleX - 1) > 10e-6;\n const scaleByY = Math.abs(attrs.scaleY - 1) > 10e-6;\n\n let newWidth = this._ref.width();\n if (scaleByX) newWidth *= attrs.scaleX;\n let newHeight = this._ref.height();\n if (scaleByY) newHeight *= attrs.scaleY;\n\n const minWidth = 50;\n const minHeight = 50;\n\n if (newWidth < minWidth) newWidth = minWidth;\n if (newHeight < minHeight) newHeight = minHeight;\n\n if (scaleByX) {\n this._ref.width(newWidth);\n }\n\n if (scaleByY) {\n this._ref.height(newHeight);\n }\n\n this._ref.scale({ x: 1, y: 1 });\n });\n\n this._ref.on(\"transformend\", (e) => {\n const attrs = e.target.attrs;\n if (attrs.rotation !== this._ref.rotation()) this._ref.rotation(attrs.rotation);\n\n const absoluteTransform = this._ref.getStage().getAbsoluteTransform();\n const position = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() });\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld(position));\n this._ref.setAttr(\n \"wcsEnd\",\n this._worldTransformer.screenToWorld({ x: position.x + this._ref.width(), y: position.y + this._ref.height() })\n );\n });\n\n this._ref.on(\"dragend\", () => {\n const absoluteTransform = this._ref.getStage().getAbsoluteTransform();\n const position = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() });\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld(position));\n this._ref.setAttr(\n \"wcsEnd\",\n this._worldTransformer.screenToWorld({ x: position.x + this._ref.width(), y: position.y + this._ref.height() })\n );\n });\n\n this._ref.id(this._ref._id.toString());\n }\n\n getPosition(): { x: number; y: number } {\n return this._ref.position();\n }\n\n getWidth(): number {\n return this._ref.width();\n }\n\n getHeight(): number {\n return this._ref.height();\n }\n\n setWidth(w: number): void {\n this._ref.width(w);\n\n const rightLowerPoint = { x: this._ref.x() + w, y: this._ref.y() + this._ref.height() };\n const wcsRightLowerPoint = this._worldTransformer.screenToWorld(rightLowerPoint);\n this._ref.setAttr(\"wcsEnd\", wcsRightLowerPoint);\n }\n\n setHeight(h: number): void {\n this._ref.height(h);\n\n const rightLowerPoint = { x: this._ref.x() + this._ref.width(), y: this._ref.y() + h };\n const wcsRightLowerPoint = this._worldTransformer.screenToWorld(rightLowerPoint);\n this._ref.setAttr(\"wcsEnd\", wcsRightLowerPoint);\n }\n\n setPosition(x: number, y: number): void {\n this._ref.setPosition({ x, y });\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x, y }));\n const rightLowerPoint = { x: x + this._ref.width(), y: y + this._ref.y() };\n const wcsRightLowerPoint = this._worldTransformer.screenToWorld(rightLowerPoint);\n this._ref.setAttr(\"wcsEnd\", wcsRightLowerPoint);\n }\n\n ref() {\n return this._ref;\n }\n\n id(): string {\n return this._ref.id();\n }\n\n enableMouseEditing(value: boolean): void {\n this._ref.draggable(value);\n }\n\n type(): string {\n return \"Rectangle\";\n }\n\n getColor(): string {\n return this._ref.stroke() as string;\n }\n\n setColor(hex: string): void {\n this._ref.stroke(hex);\n }\n\n getRotation(): number {\n return this._ref.rotation();\n }\n\n setRotation(degrees: number): void {\n this._ref.rotation(degrees);\n }\n\n getZIndex(): number {\n return this._ref.zIndex();\n }\n\n setZIndex(zIndex: number): void {\n this._ref.zIndex(zIndex);\n }\n\n delete(): void {\n this._ref.destroy();\n this._ref = null;\n }\n\n setLineWidth(size: number): void {\n this._ref.strokeWidth(size);\n }\n\n getLineWidth(): number {\n return this._ref.strokeWidth();\n }\n\n updateScreenCoordinates(): void {\n const screenPositionStart = this._worldTransformer.worldToScreen(this._ref.getAttr(\"wcsStart\"));\n const screenPositionEnd = this._worldTransformer.worldToScreen(this._ref.getAttr(\"wcsEnd\"));\n\n let invert = this._ref.getStage().getAbsoluteTransform().copy();\n invert = invert.invert();\n const positionStart = invert.point(screenPositionStart);\n const positionEnd = invert.point(screenPositionEnd);\n\n this._ref.position({ x: positionStart.x, y: positionStart.y });\n this._ref.width(Math.abs(positionEnd.x - positionStart.x));\n this._ref.height(Math.abs(positionEnd.y - positionStart.y));\n }\n}\n","export function getDistanceIn2D(p1: { x: number; y: number }, p2: { x: number; y: number }): number {\n return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport Konva from \"konva\";\nimport { IMarkupEllipse, IMarkupEllipseParams } from \"../IMarkupEllipse\";\nimport { IWorldTransform } from \"../IWorldTransform\";\nimport { WorldTransform } from \"../WorldTransform\";\nimport * as utils from \"../Utils\";\n\nexport class KonvaEllipse implements IMarkupEllipse {\n private _ref: Konva.Ellipse;\n private _worldTransformer: IWorldTransform;\n\n constructor(params: IMarkupEllipseParams, ref = null, worldTransformer = new WorldTransform()) {\n this._worldTransformer = worldTransformer;\n\n if (ref) {\n this._ref = ref;\n\n const wcsPosition = this._ref.getAttr(\"wcsPosition\");\n const radiusX = this._ref.getAttr(\"wcsRadiusX\");\n const radiusY = this._ref.getAttr(\"wcsRadiusY\");\n if (!wcsPosition) {\n this._ref.setAttr(\"wcsPosition\", this._worldTransformer.screenToWorld({ x: ref.x(), y: ref.y() }));\n }\n if (!radiusX) {\n this._ref.setAttr(\n \"wcsRadiusX\",\n this._worldTransformer.screenToWorld({ x: ref.x() + ref.radiusX(), y: ref.y() })\n );\n }\n if (!radiusY) {\n this._ref.setAttr(\n \"wcsRadiusY\",\n this._worldTransformer.screenToWorld({ x: ref.x(), y: ref.y() + ref.radiusY() })\n );\n }\n\n return;\n }\n\n if (!params) params = {};\n if (!params.position) params.position = { x: 0, y: 0 };\n if (params.position2) {\n params.radius ??= { x: 0, y: 0 };\n params.radius.x = utils.getDistanceIn2D(params.position, params.position2);\n if (params.position3) params.radius.y = utils.getDistanceIn2D(params.position, params.position3);\n else params.radius.x = params.radius.y;\n } else {\n if (!params.radius) params.radius = { x: 25, y: 25 };\n }\n\n this._ref = new Konva.Ellipse({\n stroke: params.color ?? \"#ff0000\",\n strokeWidth: params.lineWidth ?? 4,\n globalCompositeOperation: \"source-over\",\n lineCap: \"round\",\n lineJoin: \"round\",\n x: params.position.x,\n y: params.position.y,\n radiusX: params.radius.x,\n radiusY: params.radius.y,\n draggable: true,\n strokeScaleEnabled: false,\n });\n\n this._ref.setAttr(\n \"wcsPosition\",\n this._worldTransformer.screenToWorld({ x: params.position.x, y: params.position.y })\n );\n this._ref.setAttr(\n \"wcsRadiusX\",\n this._worldTransformer.screenToWorld({ x: this._ref.x() + params.radius.x, y: this._ref.y() })\n );\n this._ref.setAttr(\n \"wcsRadiusY\",\n this._worldTransformer.screenToWorld({ x: this._ref.x(), y: this._ref.y() + params.radius.y })\n );\n\n this._ref.on(\"transform\", (e) => {\n const attrs = e.target.attrs;\n\n if (attrs.rotation !== this._ref.rotation()) this._ref.rotation(attrs.rotation);\n\n const scaleByX = Math.abs(attrs.scaleX - 1) > 10e-6;\n const scaleByY = Math.abs(attrs.scaleY - 1) > 10e-6;\n\n let newRadiusX = this._ref.radiusX();\n if (scaleByX) newRadiusX *= attrs.scaleX;\n let newRadiusY = this._ref.radiusY();\n if (scaleByY) newRadiusY *= attrs.scaleY;\n\n const minRadiusX = 25;\n const minRadiusY = 25;\n\n if (newRadiusX < minRadiusX) newRadiusX = minRadiusX;\n if (newRadiusY < minRadiusY) newRadiusY = minRadiusY;\n\n if (e.evt.ctrlKey || e.evt.shiftKey) {\n if (scaleByX) {\n this._ref.radius({ x: newRadiusX, y: newRadiusX });\n } else {\n this._ref.radius({ x: newRadiusY, y: newRadiusY });\n }\n } else {\n this._ref.radius({ x: newRadiusX, y: newRadiusY });\n }\n\n this._ref.scale({ x: 1, y: 1 });\n });\n\n this._ref.on(\"transformend\", () => {\n const absoluteTransform = this._ref.getStage().getAbsoluteTransform();\n const position = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() });\n this._ref.setAttr(\"wcsPosition\", this._worldTransformer.screenToWorld(position));\n const radiusX = absoluteTransform.point({ x: this._ref.x() + this._ref.radiusX(), y: this._ref.y() });\n this._ref.setAttr(\"wcsRadiusX\", this._worldTransformer.screenToWorld(radiusX));\n const radiusY = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() + this._ref.radiusY() });\n this._ref.setAttr(\"wcsRadiusY\", this._worldTransformer.screenToWorld(radiusY));\n });\n\n this._ref.on(\"dragend\", () => {\n const absoluteTransform = this._ref.getStage().getAbsoluteTransform();\n const position = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() });\n this._ref.setAttr(\"wcsPosition\", this._worldTransformer.screenToWorld(position));\n const radiusX = absoluteTransform.point({ x: this._ref.x() + this._ref.radiusX(), y: this._ref.y() });\n this._ref.setAttr(\"wcsRadiusX\", this._worldTransformer.screenToWorld(radiusX));\n const radiusY = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() + this._ref.radiusY() });\n this._ref.setAttr(\"wcsRadiusY\", this._worldTransformer.screenToWorld(radiusY));\n });\n\n this._ref.id(this._ref._id.toString());\n }\n\n getPosition(): { x: number; y: number } {\n return this._ref.position();\n }\n\n setPosition(x: number, y: number): void {\n this._ref.setPosition({ x, y });\n this._ref.setAttr(\"wcsPosition\", this._worldTransformer.screenToWorld({ x, y }));\n }\n\n getRadiusX(): number {\n return this._ref.radiusX();\n }\n\n setRadiusX(r: number): void {\n this._ref.radiusX(r);\n this._ref.setAttr(\"wcsRadiusX\", this._worldTransformer.screenToWorld({ x: this._ref.x() + r, y: this._ref.y() }));\n }\n\n getRadiusY(): number {\n return this._ref.radiusY();\n }\n\n setRadiusY(r: number): void {\n this._ref.radiusY(r);\n this._ref.setAttr(\"wcsRadiusY\", this._worldTransformer.screenToWorld({ x: this._ref.x(), y: this._ref.y() + r }));\n }\n\n getLineWidth(): number {\n return this._ref.strokeWidth();\n }\n\n setLineWidth(size: number): void {\n this._ref.strokeWidth(size);\n }\n\n ref() {\n return this._ref;\n }\n\n id(): string {\n return this._ref.id();\n }\n\n enableMouseEditing(value: boolean): void {\n this._ref.draggable(value);\n }\n\n type(): string {\n return \"Ellipse\";\n }\n\n getColor(): string {\n return this._ref.stroke() as string;\n }\n\n setColor(hex: string): void {\n this._ref.stroke(hex);\n }\n\n getRotation(): number {\n return this._ref.rotation();\n }\n\n setRotation(degrees: number): void {\n this._ref.rotation(degrees);\n }\n\n getZIndex(): number {\n return this._ref.zIndex();\n }\n\n setZIndex(zIndex: number): void {\n this._ref.zIndex(zIndex);\n }\n\n delete(): void {\n this._ref.destroy();\n this._ref = null;\n }\n\n updateScreenCoordinates(): void {\n const screenPosition = this._worldTransformer.worldToScreen(this._ref.getAttr(\"wcsPosition\"));\n const radiusX = this._worldTransformer.worldToScreen(this._ref.getAttr(\"wcsRadiusX\"));\n const radiusY = this._worldTransformer.worldToScreen(this._ref.getAttr(\"wcsRadiusY\"));\n\n let invert = this._ref.getStage().getAbsoluteTransform().copy();\n invert = invert.invert();\n const position = invert.point({ x: screenPosition.x, y: screenPosition.y });\n\n this._ref.position({ x: position.x, y: position.y });\n this._ref.radius({\n x: Math.abs(invert.point(radiusX).x - position.x),\n y: Math.abs(invert.point(radiusY).y - position.y),\n });\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport Konva from \"konva\";\nimport { IMarkupArrow, IMarkupArrowParams } from \"../IMarkupArrow\";\nimport { IWorldTransform } from \"../IWorldTransform\";\nimport { WorldTransform } from \"../WorldTransform\";\n\nexport class KonvaArrow implements IMarkupArrow {\n private _ref: Konva.Arrow;\n private _worldTransformer: IWorldTransform;\n\n constructor(params: IMarkupArrowParams, ref = null, worldTransformer = new WorldTransform()) {\n this._worldTransformer = worldTransformer;\n\n if (ref) {\n this._ref = ref;\n const wcsStart = this._ref.getAttr(\"wcsStart\");\n const wcsEnd = this._ref.getAttr(\"wcsEnd\");\n if (!wcsStart)\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x: ref.points()[0], y: ref.points()[1] }));\n if (!wcsEnd)\n this._ref.setAttr(\"wcsEnd\", this._worldTransformer.screenToWorld({ x: ref.points()[2], y: ref.points()[3] }));\n return;\n }\n\n if (!params) params = {};\n if (!params.start) params.start = { x: 0, y: 0 };\n if (!params.end) params.end = { x: 100, y: 100 };\n\n this._ref = new Konva.Arrow({\n stroke: params.color ?? \"#ff0000\",\n fill: params.color ?? \"#ff0000\",\n strokeWidth: 4,\n globalCompositeOperation: \"source-over\",\n lineCap: \"round\",\n lineJoin: \"round\",\n points: [params.start.x, params.start.y, params.end.x, params.end.y],\n draggable: true,\n strokeScaleEnabled: false,\n });\n\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x: params.start.x, y: params.start.y }));\n this._ref.setAttr(\"wcsEnd\", this._worldTransformer.screenToWorld({ x: params.end.x, y: params.end.y }));\n\n this._ref.on(\"transformend\", (e) => {\n const attrs = e.target.attrs;\n if (attrs.rotation !== this._ref.rotation()) this._ref.rotation(attrs.rotation);\n\n const points = this._ref.points();\n const absoluteTransform = this._ref.getAbsoluteTransform();\n const transformStart = absoluteTransform.point({ x: points[0], y: points[1] });\n const transformEnd = absoluteTransform.point({ x: points[2], y: points[3] });\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld(transformStart));\n this._ref.setAttr(\"wcsEnd\", this._worldTransformer.screenToWorld(transformEnd));\n });\n\n this._ref.on(\"dragend\", (e) => {\n const points = this._ref.points();\n const absoluteTransform = e.target.getAbsoluteTransform();\n const transformStart = absoluteTransform.point({ x: points[0], y: points[1] });\n const transformEnd = absoluteTransform.point({ x: points[2], y: points[3] });\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld(transformStart));\n this._ref.setAttr(\"wcsEnd\", this._worldTransformer.screenToWorld(transformEnd));\n });\n\n this._ref.id(this._ref._id.toString());\n }\n\n ref() {\n return this._ref;\n }\n\n id(): string {\n return this._ref.id();\n }\n\n enableMouseEditing(value: boolean): void {\n this._ref.draggable(value);\n }\n\n type(): string {\n return \"Arrow\";\n }\n\n getColor(): string {\n return this._ref.stroke() as string;\n }\n\n setColor(hex: string): void {\n this._ref.stroke(hex);\n this._ref.fill(hex);\n }\n\n getRotation(): number {\n return this._ref.rotation();\n }\n\n setRotation(degrees: number): void {\n this._ref.rotation(degrees);\n }\n\n getZIndex(): number {\n return this._ref.zIndex();\n }\n\n setZIndex(zIndex: number): void {\n this._ref.zIndex(zIndex);\n }\n\n delete(): void {\n this._ref.destroy();\n this._ref = null;\n }\n\n getPoints(): { x: number; y: number }[] {\n const points = this._ref.points();\n return [\n { x: points[0], y: points[1] },\n { x: points[2], y: points[3] },\n ];\n }\n\n setPoints(points: { x: number; y: number }[]): void {\n if (points.length === 2) {\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x: points[0].x, y: points[0].y }));\n this._ref.setAttr(\"wcsEnd\", this._worldTransformer.screenToWorld({ x: points[1].x, y: points[1].y }));\n this._ref.points([points[0].x, points[0].y, points[1].x, points[1].y]);\n }\n }\n\n getStartPoint(): { x: number; y: number } {\n const points = this._ref.points();\n return { x: points[0], y: points[1] };\n }\n\n setStartPoint(x: number, y: number): void {\n const points = this._ref.points();\n this._ref.points([x, y, points[2], points[3]]);\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x, y }));\n }\n\n getEndPoint(): { x: number; y: number } {\n const points = this._ref.points();\n return { x: points[2], y: points[3] };\n }\n\n setEndPoint(x: number, y: number): void {\n const points = this._ref.points();\n this._ref.points([points[0], points[1], x, y]);\n this._ref.setAttr(\"wcsEnd\", this._worldTransformer.screenToWorld({ x, y }));\n }\n\n updateScreenCoordinates(): void {\n const screenStartPoint = this._worldTransformer.worldToScreen(this._ref.getAttr(\"wcsStart\"));\n const screenEndPoint = this._worldTransformer.worldToScreen(this._ref.getAttr(\"wcsEnd\"));\n\n let invert = this._ref.getAbsoluteTransform().copy();\n invert = invert.invert();\n const startPoint = invert.point({ x: screenStartPoint.x, y: screenStartPoint.y });\n const endPoint = invert.point({ x: screenEndPoint.x, y: screenEndPoint.y });\n\n this._ref.points([startPoint.x, startPoint.y, endPoint.x, endPoint.y]);\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport Konva from \"konva\";\nimport { IMarkupImage, IMarkupImageParams } from \"../IMarkupImage\";\nimport { IWorldTransform } from \"../IWorldTransform\";\nimport { WorldTransform } from \"../WorldTransform\";\n\nexport class KonvaImage implements IMarkupImage {\n private _ref: Konva.Image;\n private _canvasImage: HTMLImageElement;\n private _ratio = 1;\n private _worldTransformer: IWorldTransform;\n\n private readonly EPSILON = 10e-6;\n private readonly BASE64_HEADER_START = \"data:image/\";\n private readonly BASE64_NOT_FOUND =\n \"data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAADsAAAA7AF5KHG9AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAmhJREFUWIXtlr9rVEEQxz+H8RQUJIdeIopYm0vkCg0GBBtbG1NF7Kxt7dR/IGIw/uhTaBNLERURg2kCEUyCYCPi70b0InjGS57FzOZN3r19d+9HJIVfWO52dma/s7Mz8xa2KAaBCWAR+AkECWOmSOIdwC1gtQOpHc+NfQ8wClQ8+1d0vcdH/lQ3bSIRGAZ2pTjAqNovANXIWlXlAXA2zvi2Ln4AjqYgtagYEutENSLvjRoOImFv5iB32Ae8UrLXwFBk3h9ndF0VJnKSO9gTu3yKu5Z1LKnS8YIcABgw5Ks692JZFXcXRJ46Aq6kikCnHNi/mQ50WwVtfaIoBzL3gRk2drSscJ2wrc4VvUoe2wn/41/iBfoVLRnBGnDSY3AAKacy8AmYR+o7K1zCl6wgrgpOAc/MuhvfgMuk+1JGHQgSBcAloKXy78AjYBppJk5/noTulseBMZ23iD/piHFkEdgTQzKk+5wHjmHC3cmBg0BD5xcSTrFXyQPgIWFtDwMvab+2N8DpbhyY1v/3E8gdDgNfVX9SCVZ0/gW4B0wB71S2BpxLcuCM/jaQSHSDEeAX4VMuAG4gTzyHbcAVXXO6GxxwIX+vvxe7JHcYQ07nHqklj96UIW/YhSWzMKcep8VVtf8B1Dw6h4DfhB+sdbgn2R+gnoEc5NR3dZ+3QJ9H74HqXLPCGlJyTfI9y3YCs0owq3OLOpKkLeBI1HhSDT/mdKIPiUCARMTlQx34TMLjtww8IczmO8AJ/N/2JNSQXAiQ671JePePge0+wzJSQq4FFzlaenIvucUAkiQLhC/mLGNZ9xgn5s63BP4CCk0QDtm4BhoAAAAASUVORK5CYII=\";\n\n constructor(params: IMarkupImageParams, ref = null, worldTransformer = new WorldTransform()) {\n this._worldTransformer = worldTransformer;\n\n if (ref) {\n if (!ref.src || !ref.src.startsWith(this.BASE64_HEADER_START)) ref.src = this.BASE64_NOT_FOUND;\n if (ref.height() <= this.EPSILON) ref.height(32);\n if (ref.width() <= this.EPSILON) ref.width(32);\n\n this._ref = ref;\n this._canvasImage = ref.image();\n this._ratio =\n this._ref.height() <= this.EPSILON || this._ref.width() <= this.EPSILON\n ? 1\n : this._ref.height() / this._ref.width();\n\n const wcsStart = this._ref.getAttr(\"wcsStart\");\n const wcsEnd = this._ref.getAttr(\"wcsEnd\");\n if (!wcsStart) {\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x: ref.x(), y: ref.y() }));\n }\n if (!wcsEnd) {\n const rightBottomPoint = { x: ref.x() + ref.width(), y: ref.y() + ref.height() };\n this._ref.setAttr(\n \"wcsEnd\",\n this._worldTransformer.screenToWorld({ x: rightBottomPoint.x, y: rightBottomPoint.y })\n );\n }\n\n return;\n }\n\n if (!params) params = {};\n if (!params.position) params.position = { x: 0, y: 0 };\n if (!params.src || !params.src.startsWith(this.BASE64_HEADER_START)) params.src = this.BASE64_NOT_FOUND;\n if (params.position2) {\n params.width = params.position2.x - params.position.x;\n params.height = params.position2.y - params.position.y;\n }\n\n this._canvasImage = new Image();\n\n this._canvasImage.onload = () => {\n this._ref.image(this._canvasImage);\n if (this._ref.height() <= this.EPSILON) this._ref.height(this._canvasImage.height);\n if (this._ref.width() <= this.EPSILON) this._ref.width(this._canvasImage.width);\n\n this._ratio =\n this._ref.height() <= this.EPSILON || this._ref.width() <= this.EPSILON\n ? 1\n : this._ref.height() / this._ref.width();\n\n // need to rescale only if input width and height are 0 - we do not loading Viewpoint with existing params\n if (\n (params.width <= this.EPSILON || params.height <= this.EPSILON) &&\n (params.maxWidth >= this.EPSILON || params.maxWidth >= this.EPSILON)\n ) {\n const heightOutOfCanvas = params.maxHeight - this._canvasImage.height;\n const widthOutOfCanvas = params.maxWidth - this._canvasImage.width;\n\n if (heightOutOfCanvas <= this.EPSILON || widthOutOfCanvas <= this.EPSILON) {\n if (widthOutOfCanvas <= this.EPSILON && widthOutOfCanvas < heightOutOfCanvas / this._ratio) {\n this._ref.height(params.maxWidth * this._ratio);\n this._ref.width(params.maxWidth);\n } else {\n this._ref.width(params.maxHeight / this._ratio);\n this._ref.height(params.maxHeight);\n }\n }\n }\n\n const wcsEnd = this._worldTransformer.screenToWorld({\n x: params.position.x + this._ref.width(),\n y: params.position.y + this._ref.height(),\n });\n this._ref.setAttr(\"wcsEnd\", wcsEnd);\n };\n\n this._canvasImage.onerror = () => {\n this._canvasImage.onerror = function () {};\n this._canvasImage.src = this.BASE64_NOT_FOUND;\n };\n\n this._canvasImage.src = params.src;\n\n this._ref = new Konva.Image({\n x: params.position.x,\n y: params.position.y,\n image: this._canvasImage,\n width: params.width ?? 0,\n height: params.height ?? 0,\n draggable: true,\n });\n\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x: params.position.x, y: params.position.y }));\n if (params.position2) {\n this._ref.setAttr(\n \"wcsEnd\",\n this._worldTransformer.screenToWorld({ x: params.position2.x, y: params.position2.y })\n );\n }\n\n this._ref.on(\"transform\", (e) => {\n const attrs = e.target.attrs;\n\n if (attrs.rotation !== this._ref.rotation()) this._ref.rotation(attrs.rotation);\n\n const scaleByX = Math.abs(attrs.scaleX - 1) > 10e-6;\n const scaleByY = Math.abs(attrs.scaleY - 1) > 10e-6;\n\n let newWidth = this._ref.width();\n if (scaleByX) newWidth *= attrs.scaleX;\n let newHeight = this._ref.height();\n if (scaleByY) newHeight *= attrs.scaleY;\n\n if (e.evt.ctrlKey || e.evt.shiftKey) {\n if (scaleByX) {\n this._ref.width(newWidth);\n this._ref.height(newWidth * this._ratio);\n } else {\n this._ref.width(newHeight / this._ratio);\n this._ref.height(newHeight);\n }\n } else {\n if (scaleByX) {\n this._ref.width(newWidth);\n }\n if (scaleByY) {\n this._ref.height(newHeight);\n }\n }\n\n this._ref.scale({ x: 1, y: 1 });\n });\n\n this._ref.on(\"transformend\", () => {\n const absoluteTransform = this._ref.getStage().getAbsoluteTransform();\n const position = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() });\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld(position));\n this._ref.setAttr(\n \"wcsEnd\",\n this._worldTransformer.screenToWorld({ x: position.x + this._ref.width(), y: position.y + this._ref.height() })\n );\n });\n\n this._ref.on(\"dragend\", () => {\n const absoluteTransform = this._ref.getStage().getAbsoluteTransform();\n const position = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() });\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld(position));\n this._ref.setAttr(\n \"wcsEnd\",\n this._worldTransformer.screenToWorld({ x: position.x + this._ref.width(), y: position.y + this._ref.height() })\n );\n });\n\n this._ref.id(this._ref._id.toString());\n }\n\n getSrc(): string {\n return this._canvasImage.src;\n }\n\n setSrc(src: any) {\n this._canvasImage.src = src;\n }\n\n getWidth(): number {\n return this._ref.width();\n }\n\n setWidth(w: number): void {\n this._ref.width(w);\n this._ref.height(w * this._ratio);\n\n const rightLowerPoint = { x: this._ref.x() + w, y: this._ref.y() + this._ref.height() };\n const wcsRightLowerPoint = this._worldTransformer.screenToWorld(rightLowerPoint);\n this._ref.setAttr(\"wcsEnd\", wcsRightLowerPoint);\n }\n\n getHeight(): number {\n return this._ref.height();\n }\n\n setHeight(h: number): void {\n this._ref.height(h);\n this._ref.width(h / this._ratio);\n\n const rightLowerPoint = { x: this._ref.x() + this._ref.width(), y: this._ref.y() + h };\n const wcsRightLowerPoint = this._worldTransformer.screenToWorld(rightLowerPoint);\n this._ref.setAttr(\"wcsEnd\", wcsRightLowerPoint);\n }\n\n ref() {\n return this._ref;\n }\n\n id(): string {\n return this._ref.id();\n }\n\n enableMouseEditing(value: boolean): void {\n this._ref.draggable(value);\n }\n\n type(): string {\n return \"Image\";\n }\n\n getRotation(): number {\n return this._ref.rotation();\n }\n\n setRotation(degrees: number): void {\n this._ref.rotation(degrees);\n }\n\n getZIndex(): number {\n return this._ref.zIndex();\n }\n\n setZIndex(zIndex: number): void {\n this._ref.zIndex(zIndex);\n }\n\n delete(): void {\n this._ref.destroy();\n this._ref = null;\n }\n\n getPosition(): { x: number; y: number } {\n return this._ref.getPosition();\n }\n\n setPosition(x: number, y: number): void {\n this._ref.setPosition({ x, y });\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x, y }));\n const rightLowerPoint = { x: x + this._ref.width(), y: y + this._ref.y() };\n const wcsRightLowerPoint = this._worldTransformer.screenToWorld(rightLowerPoint);\n this._ref.setAttr(\"wcsEnd\", wcsRightLowerPoint);\n }\n\n updateScreenCoordinates(): void {\n const screenPositionStart = this._worldTransformer.worldToScreen(this._ref.getAttr(\"wcsStart\"));\n const screenPositionEnd = this._worldTransformer.worldToScreen(this._ref.getAttr(\"wcsEnd\"));\n\n let invert = this._ref.getStage().getAbsoluteTransform().copy();\n invert = invert.invert();\n const positionStart = invert.point(screenPositionStart);\n const positionEnd = invert.point(screenPositionEnd);\n\n this._ref.position({ x: positionStart.x, y: positionStart.y });\n this._ref.width(Math.abs(positionEnd.x - positionStart.x));\n this._ref.height(Math.abs(positionEnd.y - positionStart.y));\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport Konva from \"konva\";\nimport { IMarkupCloud, IMarkupCloudParams } from \"../IMarkupCloud\";\nimport { IWorldTransform } from \"../IWorldTransform\";\nimport { WorldTransform } from \"../WorldTransform\";\n\nexport class KonvaCloud implements IMarkupCloud {\n private _ref: Konva.Shape;\n private _worldTransformer: IWorldTransform;\n\n constructor(params: IMarkupCloudParams, ref = null, worldTransformer = new WorldTransform()) {\n this._worldTransformer = worldTransformer;\n\n if (ref) {\n this._ref = ref;\n const wcsStart = this._ref.getAttr(\"wcsStart\");\n const wcsEnd = this._ref.getAttr(\"wcsEnd\");\n if (!wcsStart) {\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x: ref.x(), y: ref.y() }));\n }\n if (!wcsEnd) {\n const rightBottomPoint = { x: ref.x() + ref.width(), y: ref.y() + ref.height() };\n this._ref.setAttr(\n \"wcsEnd\",\n this._worldTransformer.screenToWorld({ x: rightBottomPoint.x, y: rightBottomPoint.y })\n );\n }\n return;\n }\n\n if (!params) params = {};\n if (!params.position) params.position = { x: 0, y: 0 };\n if (params.position2) {\n params.width = params.position2.x - params.position.x;\n params.height = params.position2.y - params.position.y;\n } else {\n if (!params.width || !params.height) {\n params.position2 = { x: 200, y: 200 };\n params.width = 200;\n params.height = 200;\n } else {\n params.position2 = { x: params.position.x + params.width, y: params.position.y + params.height };\n }\n }\n\n const ARC_RADIUS = 8;\n const ARC_LENGTH = 15;\n const MIN_CLOUD_WIDTH = 50;\n const MIN_CLOUD_HEIGHT = 50;\n\n this._ref = new Konva.Shape({\n x: params.position.x,\n y: params.position.y,\n width: params.width ?? 200,\n height: params.height ?? 200,\n stroke: params.color ?? \"#ff0000\",\n strokeWidth: params.lineWidth ?? 4,\n draggable: true,\n strokeScaleEnabled: false,\n globalCompositeOperation: \"source-over\",\n sceneFunc: (context, shape) => {\n const width = this._ref.width();\n const height = this._ref.height();\n const points = [\n { x: 0, y: 0 },\n { x: 0 + width, y: 0 },\n { x: 0 + width, y: 0 + height },\n { x: 0, y: 0 + height },\n { x: 0, y: 0 },\n ];\n\n if (width >= MIN_CLOUD_WIDTH - 1 || height >= MIN_CLOUD_HEIGHT - 1) drawCloud(ARC_RADIUS, ARC_LENGTH);\n else if (width >= MIN_CLOUD_WIDTH / 2 || height >= MIN_CLOUD_HEIGHT / 2)\n drawCloud(ARC_RADIUS / 2, ARC_LENGTH / 2);\n else drawRectangle();\n\n function calculateMidpoint(position) {\n const midX = position.x + width / 2;\n const midY = position.y + height / 2;\n return { x: midX, y: midY };\n }\n\n function drawCloud(arcRadius, arcLength) {\n const midPoint = calculateMidpoint({ x: 0, y: 0 });\n\n context.beginPath();\n for (let iPoint = 0; iPoint < points.length - 1; iPoint++) {\n let approxArcLength = arcLength;\n const dx = points[iPoint + 1].x - points[iPoint].x;\n const dy = points[iPoint + 1].y - points[iPoint].y;\n const length = Math.sqrt(dx * dx + dy * dy);\n\n const arcCount = Math.floor(length / approxArcLength);\n const lengthMod = length % approxArcLength;\n approxArcLength = arcLength + arcCount / lengthMod;\n\n let pX = points[iPoint].x + dx / arcCount / 2;\n let pY = points[iPoint].y + dy / arcCount / 2;\n const pEndX = points[iPoint + 1].x;\n const pEndY = points[iPoint + 1].y;\n const endAngle = Math.atan((pEndY - pY) / (pEndX - pX));\n const startAngle = endAngle + Math.PI;\n const counterClockwise = pX > midPoint.x && pY > midPoint.y;\n for (let iArc = 0; iArc < arcCount; iArc++) {\n if (counterClockwise) {\n context.arc(pX, pY, arcRadius, endAngle, startAngle);\n } else {\n context.arc(pX, pY, arcRadius, startAngle, endAngle);\n }\n\n pX += dx / arcCount;\n pY += dy / arcCount;\n }\n }\n\n context.closePath();\n // (!) Konva specific method, it is very important\n // it will apply are required styles\n context.fillStrokeShape(shape);\n }\n\n function drawRectangle() {\n context.beginPath();\n context.lineTo(points[1].x, points[1].y);\n context.lineTo(points[2].x, points[2].y);\n context.lineTo(points[3].x, points[3].y);\n context.lineTo(points[4].x, points[4].y);\n context.closePath();\n // (!) Konva specific method, it is very important\n // it will apply are required styles\n context.fillStrokeShape(shape);\n }\n },\n });\n\n this._ref.className = \"Cloud\";\n\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x: params.position.x, y: params.position.y }));\n this._ref.setAttr(\"wcsEnd\", this._worldTransformer.screenToWorld({ x: params.position2.x, y: params.position2.y }));\n\n this._ref.on(\"transform\", (e) => {\n const attrs = e.target.attrs;\n\n const scaleByX = Math.abs(attrs.scaleX - 1) > 10e-6;\n const scaleByY = Math.abs(attrs.scaleY - 1) > 10e-6;\n\n let newWidth = this._ref.width();\n if (scaleByX) newWidth *= attrs.scaleX;\n let newHeight = this._ref.height();\n if (scaleByY) newHeight *= attrs.scaleY;\n\n if (newWidth < MIN_CLOUD_WIDTH) newWidth = MIN_CLOUD_WIDTH;\n if (newHeight < MIN_CLOUD_HEIGHT) newHeight = MIN_CLOUD_HEIGHT;\n\n if (scaleByX) {\n this._ref.width(newWidth);\n }\n\n if (scaleByY) {\n this._ref.height(newHeight);\n }\n\n this._ref.scale({ x: 1, y: 1 });\n });\n\n this._ref.on(\"transformend\", (e) => {\n const attrs = e.target.attrs;\n if (attrs.rotation !== this._ref.rotation()) this._ref.rotation(attrs.rotation);\n\n const absoluteTransform = this._ref.getStage().getAbsoluteTransform();\n const position = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() });\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld(position));\n this._ref.setAttr(\n \"wcsEnd\",\n this._worldTransformer.screenToWorld({ x: position.x + this._ref.width(), y: position.y + this._ref.height() })\n );\n });\n\n this._ref.on(\"dragend\", () => {\n const absoluteTransform = this._ref.getStage().getAbsoluteTransform();\n const position = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() });\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld(position));\n this._ref.setAttr(\n \"wcsEnd\",\n this._worldTransformer.screenToWorld({ x: position.x + this._ref.width(), y: position.y + this._ref.height() })\n );\n });\n\n this._ref.getSelfRect = () => {\n return {\n x: 0 - ARC_RADIUS,\n y: 0 - ARC_RADIUS,\n width: this._ref.width() + 2 * ARC_RADIUS,\n height: this._ref.height() + 2 * ARC_RADIUS,\n };\n };\n\n this._ref.id(this._ref._id.toString());\n }\n\n ref() {\n return this._ref;\n }\n\n id(): string {\n return this._ref.id();\n }\n\n enableMouseEditing(value: boolean): void {\n this._ref.draggable(value);\n }\n\n type(): string {\n return \"Cloud\";\n }\n\n getColor(): string {\n return this._ref.stroke() as string;\n }\n\n setColor(hex: string): void {\n this._ref.stroke(hex);\n }\n\n getRotation(): number {\n return this._ref.rotation();\n }\n\n setRotation(degrees: number): void {\n this._ref.rotation(degrees);\n }\n\n getZIndex(): number {\n return this._ref.zIndex();\n }\n\n setZIndex(zIndex: number): void {\n this._ref.zIndex(zIndex);\n }\n\n delete(): void {\n this._ref.destroy();\n this._ref = null;\n }\n\n getPosition() {\n return this._ref.position();\n }\n\n setPosition(x: number, y: number): void {\n this._ref.position({ x, y });\n this._ref.setAttr(\"wcsStart\", this._worldTransformer.screenToWorld({ x, y }));\n const rightLowerPoint = { x: x + this._ref.width(), y: y + this._ref.y() };\n const wcsRightLowerPoint = this._worldTransformer.screenToWorld(rightLowerPoint);\n this._ref.setAttr(\"wcsEnd\", wcsRightLowerPoint);\n }\n\n getWidth(): number {\n return this._ref.width();\n }\n\n setWidth(w: number): void {\n this._ref.width(w);\n\n const rightLowerPoint = { x: this._ref.x() + w, y: this._ref.y() + this._ref.height() };\n const wcsRightLowerPoint = this._worldTransformer.screenToWorld(rightLowerPoint);\n this._ref.setAttr(\"wcsEnd\", wcsRightLowerPoint);\n }\n\n getHeight(): number {\n return this._ref.height();\n }\n\n setHeight(h: number): void {\n this._ref.height(h);\n\n const rightLowerPoint = { x: this._ref.x() + this._ref.width(), y: this._ref.y() + h };\n const wcsRightLowerPoint = this._worldTransformer.screenToWorld(rightLowerPoint);\n this._ref.setAttr(\"wcsEnd\", wcsRightLowerPoint);\n }\n\n getLineWidth(): number {\n return this._ref.strokeWidth();\n }\n\n setLineWidth(size: number): void {\n this._ref.strokeWidth(size);\n }\n\n updateScreenCoordinates(): void {\n const screenPositionStart = this._worldTransformer.worldToScreen(this._ref.getAttr(\"wcsStart\"));\n const screenPositionEnd = this._worldTransformer.worldToScreen(this._ref.getAttr(\"wcsEnd\"));\n\n let invert = this._ref.getStage().getAbsoluteTransform().copy();\n invert = invert.invert();\n const positionStart = invert.point(screenPositionStart);\n const positionEnd = invert.point(screenPositionEnd);\n\n this._ref.position({ x: positionStart.x, y: positionStart.y });\n this._ref.width(Math.abs(positionEnd.x - positionStart.x));\n this._ref.height(Math.abs(positionEnd.y - positionStart.y));\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport Konva from \"konva\";\nimport { IEventEmitter } from \"@inweb/eventemitter2\";\nimport {\n ChangeActiveDraggerEvent,\n IArrow,\n ICloud,\n IEllipse,\n IImage,\n ILine,\n IRectangle,\n IText,\n IViewpoint,\n} from \"@inweb/viewer-core\";\n\nimport { IMarkup, MarkupMode } from \"../IMarkup\";\nimport { IWorldTransform } from \"../IWorldTransform\";\nimport { WorldTransform } from \"../WorldTransform\";\nimport { IMarkupObject } from \"../IMarkupObject\";\nimport { MarkupLineType } from \"../IMarkupLine\";\nimport { MarkupColor } from \"./MarkupColor\";\nimport { KonvaLine } from \"./KonvaLine\";\nimport { KonvaText } from \"./KonvaText\";\nimport { KonvaRectangle } from \"./KonvaRectangle\";\nimport { KonvaEllipse } from \"./KonvaEllipse\";\nimport { KonvaArrow } from \"./KonvaArrow\";\nimport { KonvaImage } from \"./KonvaImage\";\nimport { KonvaCloud } from \"./KonvaCloud\";\n\nconst MarkupMode2Konva = {\n SelectMarkup: {\n name: \"SelectMarkup\",\n initializer: null,\n },\n Line: {\n name: \"Line\",\n initializer: (ref: any, params = null, ...attr: any) => new KonvaLine(params, ref, ...attr),\n },\n Text: {\n name: \"Text\",\n initializer: (ref: any, params = null, ...attr: any) => new KonvaText(params, ref, ...attr),\n },\n Rectangle: {\n name: \"Rect\",\n initializer: (ref: any, params = null, ...attr: any) => new KonvaRectangle(params, ref, ...attr),\n },\n Ellipse: {\n name: \"Ellipse\",\n initializer: (ref: any, params = null, ...attr: any) => new KonvaEllipse(params, ref, ...attr),\n },\n Arrow: {\n name: \"Arrow\",\n initializer: (ref: any, params = null, ...attr: any) => new KonvaArrow(params, ref, ...attr),\n },\n Image: {\n name: \"Image\",\n initializer: (ref: any, params = null, ...attr: any) => new KonvaImage(params, ref, ...attr),\n },\n Cloud: {\n name: \"Cloud\",\n initializer: (ref: any, params = null, ...attr: any) => new KonvaCloud(params, ref, ...attr),\n },\n};\n\n/**\n * 2D markup core.\n */\nexport class KonvaMarkup implements IMarkup {\n private _viewer: IEventEmitter;\n private _worldTransformer: IWorldTransform;\n private _container: HTMLElement;\n private _markupIsActive = false;\n private _markupMode: MarkupMode;\n private _markupColor = new MarkupColor(255, 0, 0);\n private _konvaStage: Konva.Stage;\n private _konvaLayer: Konva.Layer;\n private _konvaTransformer: Konva.Transformer;\n\n private _textInputRef: HTMLTextAreaElement;\n private _textInputPos: Konva.Vector2d;\n private _textInputAngle: number;\n private _imageInputRef: HTMLInputElement;\n private _imageInputPos: Konva.Vector2d;\n private _markupContainer: HTMLDivElement;\n private _resizeObserver: ResizeObserver;\n private _groupImages: Konva.Group;\n private _groupGeometry: Konva.Group;\n private _groupTexts: Konva.Group;\n\n public lineWidth = 4;\n public lineType: MarkupLineType = \"solid\";\n public fontSize = 34;\n\n initialize(\n container: HTMLElement,\n containerEvents?: string[],\n viewer?: IEventEmitter,\n worldTransformer?: IWorldTransform\n ): void {\n this._viewer = viewer;\n this._worldTransformer = worldTransformer ?? new WorldTransform();\n this._container = container;\n\n this._markupContainer = document.createElement(\"div\");\n this._markupContainer.id = \"markup-container\";\n this._markupContainer.style.position = \"absolute\";\n this._markupContainer.style.outline = \"0px\"; // <- to eliminate grey box during delete elements\n this._markupContainer.style.pointerEvents = \"none\";\n\n const parentDiv = this._container.parentElement;\n parentDiv.appendChild(this._markupContainer);\n\n this._markupColor.setColor(255, 0, 0);\n\n this.initializeKonva();\n\n this._resizeObserver = new ResizeObserver(this.resizeContainer);\n this._resizeObserver.observe(container);\n\n if (this._viewer) {\n this._viewer.addEventListener(\"changeactivedragger\", this.changeActiveDragger);\n this._viewer.addEventListener(\"pan\", this.pan);\n this._viewer.addEventListener(\"zoomat\", this.zoomAt);\n this._viewer.addEventListener(\"changecameramode\", this.changeCameraMode);\n }\n }\n\n dispose(): void {\n if (this._viewer) {\n this._viewer.removeEventListener(\"changecameramode\", this.changeCameraMode);\n this._viewer.removeEventListener(\"zoomat\", this.zoomAt);\n this._viewer.removeEventListener(\"pan\", this.pan);\n this._viewer.removeEventListener(\"changeactivedragger\", this.changeActiveDragger);\n }\n\n this._resizeObserver?.disconnect();\n this._resizeObserver = undefined;\n\n this.destroyKonva();\n\n this._markupContainer?.remove();\n this._markupContainer = undefined;\n\n this._container = undefined;\n this._viewer = undefined;\n this._worldTransformer = undefined;\n\n this._markupIsActive = false;\n }\n\n changeActiveDragger = (event: ChangeActiveDraggerEvent) => {\n const draggerName = event.data;\n\n this._markupContainer.className = this._container.className\n .split(\" \")\n .filter((x) => !x.startsWith(\"oda-cursor-\"))\n .filter((x) => x)\n .concat(`oda-cursor-${draggerName.toLowerCase()}`)\n .join(\" \");\n\n this.removeTextInput();\n this.removeImageInput();\n\n this.enableEditMode(draggerName as MarkupMode);\n };\n\n resizeContainer = () => {\n const { offsetLeft, offsetTop, offsetWidth, offsetHeight } = this._container;\n\n if (!offsetWidth || !offsetHeight) return; // <- invisible container, or container with parent removed\n\n this._markupContainer.style.left = `${offsetLeft}px`;\n this._markupContainer.style.top = `${offsetTop}px`;\n\n this._konvaStage.width(offsetWidth);\n this._konvaStage.height(offsetHeight);\n\n this.getObjects().forEach((markupObject) => {\n markupObject.updateScreenCoordinates();\n });\n };\n\n pan = () => {\n this.updateScreenCoordinatesForAll();\n };\n\n zoomAt = () => {\n this.updateScreenCoordinatesForAll();\n };\n\n changeCameraMode = () => {\n this.clearOverlay();\n };\n\n redirectToViewer = (event: any) => {\n if (this._viewer) this._viewer.emit(event);\n };\n\n syncOverlay(): void {}\n\n clearOverlay(): void {\n this.removeTextInput();\n this.removeImageInput();\n this.clearSelected();\n this.getObjects().forEach((obj) => obj.delete());\n }\n\n getMarkupColor(): { r: number; g: number; b: number } {\n return this._markupColor.asRGB();\n }\n\n setMarkupColor(r: number, g: number, b: number): void {\n this._markupColor.setColor(r, g, b);\n this.redirectToViewer({ type: \"changemarkupcolor\", data: { r, g, b } });\n }\n\n colorizeAllMarkup(r: number, g: number, b: number): void {\n this.setMarkupColor(r, g, b);\n const hexColor = new MarkupColor(r, g, b).asHex();\n this.getObjects().filter((obj: any) => obj.setColor?.(hexColor));\n }\n\n colorizeSelectedMarkups(r: number, g: number, b: number): void {\n const hexColor = new MarkupColor(r, g, b).asHex();\n this.getSelectedObjects().filter((obj: any) => obj.setColor?.(hexColor));\n }\n\n setViewpoint(viewpoint: IViewpoint): void {\n this.clearSelected();\n this.removeTextInput();\n this.removeImageInput();\n this._konvaStage.scale({ x: 1, y: 1 });\n this._konvaStage.position({ x: 0, y: 0 });\n\n const markupColor = viewpoint.custom_fields?.markup_color || { r: 255, g: 0, b: 0 };\n this.setMarkupColor(markupColor.r, markupColor.g, markupColor.b);\n\n viewpoint.lines?.forEach((line: ILine) => {\n const linePoints = [];\n line.points.forEach((point) => {\n const screenPoint = this._worldTransformer.worldToScreen(point);\n linePoints.push(screenPoint.x);\n linePoints.push(screenPoint.y);\n });\n this.addLine(linePoints, line.color, line.type as MarkupLineType, line.width, line.id);\n });\n\n viewpoint.texts?.forEach((text: IText) => {\n const screenPoint = this._worldTransformer.worldToScreen(text.position);\n this.addText(text.text, screenPoint, text.angle, text.color, text.text_size, text.font_size, text.id);\n });\n\n viewpoint.rectangles?.forEach((rect: IRectangle) => {\n const screenPoint = this._worldTransformer.worldToScreen(rect.position);\n const screenPoint2 = rect.position2 ? this._worldTransformer.worldToScreen(rect.position2) : null;\n this.addRectangle(screenPoint, screenPoint2, rect.width, rect.height, rect.line_width, rect.color, rect.id);\n });\n\n viewpoint.ellipses?.forEach((ellipse: IEllipse) => {\n const screenPoint = this._worldTransformer.worldToScreen(ellipse.position);\n const screenPoint2 = ellipse.position2 ? this._worldTransformer.worldToScreen(ellipse.position2) : null;\n const screenPoint3 = ellipse.position3 ? this._worldTransformer.worldToScreen(ellipse.position3) : null;\n this.addEllipse(\n screenPoint,\n screenPoint2,\n screenPoint3,\n ellipse.radius,\n ellipse.line_width,\n ellipse.color,\n ellipse.id\n );\n });\n\n viewpoint.arrows?.forEach((arrow: IArrow) => {\n const startPoint = this._worldTransformer.worldToScreen(arrow.start);\n const endPoint = this._worldTransformer.worldToScreen(arrow.end);\n this.addArrow(startPoint, endPoint, arrow.color, arrow.id);\n });\n\n viewpoint.clouds?.forEach((cloud: ICloud) => {\n const screenPoint = this._worldTransformer.worldToScreen(cloud.position);\n const screenPoint2 = cloud.position2 ? this._worldTransformer.worldToScreen(cloud.position2) : null;\n this.addCloud(screenPoint, screenPoint2, cloud.width, cloud.height, cloud.line_width, cloud.color, cloud.id);\n });\n\n viewpoint.images?.forEach((image: IImage) => {\n const screenPoint = this._worldTransformer.worldToScreen(image.position);\n const screenPoint2 = image.position2 ? this._worldTransformer.worldToScreen(image.position2) : null;\n this.addImage(screenPoint, screenPoint2, image.src, image.width, image.height, image.id);\n });\n }\n\n getViewpoint(viewpoint: IViewpoint): IViewpoint {\n if (!viewpoint) viewpoint = {};\n\n viewpoint.lines = this.getMarkupLines();\n viewpoint.texts = this.getMarkupTexts();\n viewpoint.arrows = this.getMarkupArrows();\n viewpoint.clouds = this.getMarkupClouds();\n viewpoint.ellipses = this.getMarkupEllipses();\n viewpoint.images = this.getMarkupImages();\n viewpoint.rectangles = this.getMarkupRectangles();\n\n viewpoint.custom_fields = { markup_color: this.getMarkupColor() };\n viewpoint.snapshot = { data: this.combineMarkupWithDrawing() };\n\n return viewpoint;\n }\n\n enableEditMode(mode: MarkupMode | false): this {\n if (!mode || !MarkupMode2Konva[mode]) {\n this.clearSelected();\n this.removeTextInput();\n this.removeImageInput();\n this._markupContainer.style.pointerEvents = \"none\";\n this._markupIsActive = false;\n } else {\n this._markupMode = mode;\n this._markupContainer.style.pointerEvents = \"all\";\n this._markupIsActive = true;\n }\n return this;\n }\n\n createObject(type: string, params: any): IMarkupObject {\n const konvaShape = MarkupMode2Konva[type];\n if (!konvaShape || !konvaShape.initializer)\n throw new Error(`Markup CreateObject - unsupported markup type ${type}`);\n\n const object = konvaShape.initializer(null, params, this._worldTransformer);\n this.addObject(object);\n\n return object;\n }\n\n getObjects(): IMarkupObject[] {\n const objects = [];\n Object.keys(MarkupMode2Konva).forEach((type) => {\n const konvaShape = MarkupMode2Konva[type];\n this.konvaLayerFind(type).forEach((ref) =>\n objects.push(konvaShape.initializer(ref, null, this._worldTransformer))\n );\n });\n return objects;\n }\n\n getSelectedObjects(): IMarkupObject[] {\n if (!this._konvaTransformer) return [];\n\n return this._konvaTransformer\n .nodes()\n .map((ref) => {\n const name = ref.className;\n const konvaShape = Object.values(MarkupMode2Konva).find((shape) => shape.name === name);\n return konvaShape ? konvaShape.initializer(ref, null, this._worldTransformer) : null;\n })\n .filter((x) => x);\n }\n\n selectObjects(objects: IMarkupObject[]) {\n if (!this._konvaTransformer) return;\n\n const selectedObjs = this._konvaTransformer.nodes().concat(objects.map((x) => x.ref()));\n this._konvaTransformer.nodes(selectedObjs);\n }\n\n clearSelected(): void {\n if (this._konvaTransformer) this._konvaTransformer.nodes([]);\n }\n\n private addObject(object: IMarkupObject): void {\n if (object.type() === \"Image\") this._groupImages.add(object.ref());\n else if (object.type() === \"Text\") this._groupTexts.add(object.ref());\n else this._groupGeometry.add(object.ref());\n }\n\n private konvaLayerFind(type: string): any {\n if (!this._konvaLayer) return [];\n\n const konvaShape = MarkupMode2Konva[type];\n if (!konvaShape || !konvaShape.initializer) return [];\n\n // for \"draggable\" Konva uses Rectangles in Transformer. We need only Shapes from layer.\n return this._konvaLayer\n .find(konvaShape.name)\n .filter(\n (ref) =>\n ref.parent === this._konvaLayer ||\n ref.parent === this._groupImages ||\n ref.parent === this._groupGeometry ||\n ref.parent === this._groupTexts\n );\n }\n\n private getRelativePointPosition = (point, node) => {\n // the function will return pointer position relative to the passed node\n const transform = node.getAbsoluteTransform().copy();\n // to detect relative position we need to invert transform\n transform.invert();\n // get pointer (say mouse or touch) position\n // now we find relative point\n return transform.point(point);\n };\n\n private getRelativePointerPosition = (node) => {\n return this.getRelativePointPosition(node.getStage().getPointerPosition(), node);\n };\n\n private updateScreenCoordinatesForAll() {\n this.getObjects().forEach((markupObject) => {\n markupObject.updateScreenCoordinates();\n });\n }\n\n private initializeKonva(): any {\n // first we need Konva core things: stage and layer\n const stage = new Konva.Stage({\n container: this._markupContainer,\n width: this._container.clientWidth,\n height: this._container.clientHeight,\n });\n this._konvaStage = stage;\n\n const layer = new Konva.Layer({ pixelRation: window.devicePixelRatio });\n stage.add(layer);\n\n this._groupImages = new Konva.Group();\n layer.add(this._groupImages);\n this._groupGeometry = new Konva.Group();\n layer.add(this._groupGeometry);\n this._groupTexts = new Konva.Group();\n layer.add(this._groupTexts);\n\n this._konvaLayer = layer;\n\n const transformer = new Konva.Transformer({\n shouldOverdrawWholeArea: false,\n keepRatio: false,\n flipEnabled: false,\n });\n layer.add(transformer);\n this._konvaTransformer = transformer;\n\n let isPaint = false;\n let lastLine;\n let mouseDownPos;\n let lastObj;\n\n stage.on(\"mousedown touchstart\", (e) => {\n // do nothing if we mousedown on any shape\n if (!this._markupIsActive || e.target !== stage || this._markupMode === \"Text\" || this._markupMode === \"Image\")\n return;\n\n if (e.target === stage && transformer.nodes().length > 0) {\n transformer.nodes([]);\n return;\n }\n\n const pos = this.getRelativePointerPosition(stage);\n mouseDownPos = pos;\n\n isPaint = [\"Arrow\", \"Cloud\", \"Ellipse\", \"Line\", \"Rectangle\"].some((m) => m === this._markupMode);\n if (this._markupMode === \"Line\") {\n // add point twice, so we have some drawings even on a simple click\n lastLine = this.addLine([pos.x, pos.y, pos.x, pos.y]);\n }\n });\n\n stage.on(\"mouseup touchend\", () => {\n if (!this._markupIsActive) return;\n\n if (isPaint) {\n const pos = this.getRelativePointerPosition(stage);\n const defParams = mouseDownPos && pos.x === mouseDownPos.x && pos.y === mouseDownPos.y;\n const startX = defParams ? mouseDownPos.x : Math.min(mouseDownPos.x, pos.x);\n const startY = defParams ? mouseDownPos.y : Math.min(mouseDownPos.y, pos.y);\n const dX = defParams ? 200 : Math.abs(mouseDownPos.x - pos.x);\n const dY = defParams ? 200 : Math.abs(mouseDownPos.y - pos.y);\n if (defParams) {\n if (this._markupMode === \"Rectangle\") {\n this.addRectangle({ x: startX, y: startY }, null, dX, dY);\n } else if (this._markupMode === \"Ellipse\") {\n this.addEllipse({ x: startX, y: startY }, null, null, { x: dX / 2, y: dY / 2 });\n } else if (this._markupMode === \"Arrow\") {\n this.addArrow(\n { x: mouseDownPos.x, y: mouseDownPos.y },\n { x: defParams ? mouseDownPos.x + 200 : pos.x, y: defParams ? startY : pos.y }\n );\n } else if (this._markupMode === \"Cloud\") {\n this.addCloud({ x: startX, y: startY }, null, Math.max(100, dX), Math.max(100, dY));\n }\n }\n }\n\n lastObj = undefined;\n isPaint = false;\n });\n\n stage.on(\"mousemove touchmove\", () => {\n if (!this._markupIsActive) return;\n if (!isPaint) {\n return;\n }\n\n // prevent scrolling on touch devices\n //e.evt.preventDefault();\n\n const pos = this.getRelativePointerPosition(stage);\n const defParams = mouseDownPos && pos.x === mouseDownPos.x && pos.y === mouseDownPos.y;\n const startX = defParams ? mouseDownPos.x : Math.min(mouseDownPos.x, pos.x);\n const startY = defParams ? mouseDownPos.y : Math.min(mouseDownPos.y, pos.y);\n const dX = defParams ? 200 : Math.abs(mouseDownPos.x - pos.x);\n const dY = defParams ? 200 : Math.abs(mouseDownPos.y - pos.y);\n\n if (this._markupMode === \"Line\") {\n lastLine.addPoints([{ x: pos.x, y: pos.y }]);\n } else if (this._markupMode === \"Arrow\") {\n if (lastObj) lastObj.setEndPoint(pos.x, pos.y);\n else lastObj = this.addArrow({ x: mouseDownPos.x, y: mouseDownPos.y }, { x: pos.x, y: pos.y });\n } else if (this._markupMode === \"Rectangle\") {\n if (lastObj) {\n lastObj.setPosition(startX, startY);\n lastObj.setWidth(dX);\n lastObj.setHeight(dY);\n } else lastObj = this.addRectangle({ x: startX, y: startY }, null, dX, dY);\n } else if (this._markupMode === \"Ellipse\") {\n if (lastObj) {\n lastObj.setPosition(startX, startY);\n lastObj.setRadiusX(dX);\n lastObj.setRadiusY(dY);\n } else lastObj = this.addEllipse({ x: startX, y: startY }, null, null, { x: dX, y: dY });\n } else if (this._markupMode === \"Cloud\") {\n if (lastObj) {\n lastObj.setPosition(startX, startY);\n lastObj.setWidth(Math.max(100, dX));\n lastObj.setHeight(Math.max(100, dY));\n } else lastObj = this.addCloud({ x: startX, y: startY }, null, dX, dY);\n }\n });\n\n // clicks should select/deselect shapes\n stage.on(\"click tap\", (e) => {\n if (!this._markupIsActive) return;\n\n // if click on empty area - remove all selections\n if (e.target === stage) {\n if (this._markupMode === \"Text\") {\n if (this._textInputRef && this._textInputRef.value)\n this.addText(this._textInputRef.value, this._textInputPos, this._textInputAngle);\n else if (transformer.nodes().length === 0) {\n const pos = this.getRelativePointerPosition(stage);\n this.createTextInput(pos, e.evt.pageX, e.evt.pageY, 0, null);\n }\n } else if (this._markupMode === \"Image\") {\n if (this._imageInputRef && this._imageInputRef.value)\n this.addImage(\n { x: this._imageInputPos.x, y: this._imageInputPos.y },\n null,\n this._imageInputRef.value,\n 0,\n 0,\n this._imageInputRef.value\n );\n else if (transformer.nodes().length === 0) {\n const pos = this.getRelativePointerPosition(stage);\n this.createImageInput(pos);\n }\n }\n transformer.nodes([]);\n return;\n }\n\n if (this._markupMode === \"Text\" || this._markupMode === \"SelectMarkup\") {\n if (e.target.className === \"Text\" && transformer.nodes().length === 1 && transformer.nodes()[0] === e.target) {\n if (this._textInputRef && this._textInputRef.value)\n this.addText(this._textInputRef.value, this._textInputPos, this._textInputAngle);\n else\n this.createTextInput(\n { x: e.target.attrs.x, y: e.target.attrs.y },\n e.evt.pageX,\n e.evt.pageY,\n e.target.attrs.rotation,\n e.target.attrs.text\n );\n return;\n } else {\n this.removeTextInput();\n }\n }\n\n if (this._markupMode === \"Image\" || this._markupMode === \"SelectMarkup\") {\n if (e.target.className === \"Image\" && transformer.nodes().length === 1 && transformer.nodes()[0] === e.target) {\n if (this._imageInputRef && this._imageInputRef.value)\n this.addImage(this._imageInputPos, null, this._imageInputRef.value, 0, 0);\n else this.createImageInput({ x: e.target.attrs.x, y: e.target.attrs.y });\n return;\n } else {\n this.removeImageInput();\n }\n }\n\n if (\n transformer.nodes().filter((x) => x.className === \"Cloud\" || x.className === \"Image\").length > 0 ||\n e.target.className === \"Cloud\" ||\n e.target.className === \"Image\"\n ) {\n transformer.rotateEnabled(false);\n } else {\n transformer.rotateEnabled(true);\n }\n\n // do we pressed shift or ctrl?\n const metaPressed = e.evt.shiftKey || e.evt.ctrlKey || e.evt.metaKey;\n const isSelected = transformer.nodes().indexOf(e.target) >= 0;\n\n if (!metaPressed && !isSelected) {\n // if no key pressed and the node is not selected\n // select just one\n transformer.nodes([e.target]);\n } else if (metaPressed && isSelected) {\n // if we pressed keys and node was selected\n // we need to remove it from selection:\n const nodes = transformer.nodes().slice(); // use slice to have new copy of array\n // remove node from array\n nodes.splice(nodes.indexOf(e.target), 1);\n transformer.nodes(nodes);\n } else if (metaPressed && !isSelected) {\n // add the node into selection\n const nodes = transformer.nodes().concat([e.target]);\n transformer.nodes(nodes);\n }\n });\n\n const container = stage.container();\n container.tabIndex = 1;\n // focus it\n // also stage will be in focus on its click\n container.focus();\n\n container.addEventListener(\"keydown\", (e) => {\n if (!this._markupIsActive) return;\n if (e.code === \"Delete\") {\n this.getSelectedObjects().forEach((obj: IMarkupObject) => obj.delete());\n this.clearSelected();\n return;\n }\n e.preventDefault();\n });\n }\n\n private destroyKonva() {\n this.removeTextInput();\n this.removeImageInput();\n this.clearOverlay();\n\n this._konvaStage?.destroy();\n\n this._groupImages = undefined;\n this._groupGeometry = undefined;\n this._groupTexts = undefined;\n this._konvaLayer = undefined;\n this._konvaTransformer = undefined;\n this._konvaStage = undefined;\n }\n\n private getMarkupLines(): Array<ILine> {\n const lines = [];\n\n this.konvaLayerFind(\"Line\").forEach((ref) => {\n const wcsPoints = ref.getAttr(\"wcsPoints\");\n if (!wcsPoints) return;\n\n const konvaLine = new KonvaLine(null, ref, this._worldTransformer);\n const line: ILine = {\n id: konvaLine.id(),\n points: wcsPoints,\n color: konvaLine.getColor() || \"#ff0000\",\n type: konvaLine.getLineType() || this.lineType,\n width: konvaLine.getLineWidth() || this.lineWidth,\n };\n\n lines.push(line);\n });\n\n return lines;\n }\n\n private getMarkupTexts(): Array<IText> {\n const texts = [];\n\n this.konvaLayerFind(\"Text\").forEach((ref) => {\n const textSize = 0.02;\n const textScale = this._worldTransformer.getScale();\n\n const wcsPosition = ref.getAttr(\"wcsStart\");\n const stageAbsoluteTransform = this._konvaStage.getAbsoluteTransform();\n\n const shape = new KonvaText(null, ref, this._worldTransformer);\n const text: IText = {\n id: shape.id(),\n position: wcsPosition,\n text: shape.getText(),\n text_size: textSize * textScale.y,\n angle: shape.getRotation(),\n color: shape.getColor(),\n font_size: shape.getFontSize() * stageAbsoluteTransform.getMatrix()[0],\n };\n\n texts.push(text);\n });\n\n return texts;\n }\n\n private getMarkupRectangles(): Array<IRectangle> {\n const rectangles = [];\n\n this.konvaLayerFind(\"Rectangle\").forEach((ref) => {\n const wcsStart = ref.getAttr(\"wcsStart\");\n const wcsEnd = ref.getAttr(\"wcsEnd\");\n const screenStart = this._worldTransformer.worldToScreen(wcsStart);\n const screenEnd = this._worldTransformer.worldToScreen(wcsEnd);\n\n const shape = new KonvaRectangle(null, ref, this._worldTransformer);\n const rectangle: IRectangle = {\n id: shape.id(),\n position: wcsStart,\n position2: wcsEnd,\n width: Math.abs(screenStart.x - screenEnd.x),\n height: Math.abs(screenStart.y - screenEnd.y),\n line_width: shape.getLineWidth(),\n color: shape.getColor(),\n };\n\n rectangles.push(rectangle);\n });\n\n return rectangles;\n }\n\n private getMarkupEllipses(): Array<IEllipse> {\n const ellipses = [];\n\n this.konvaLayerFind(\"Ellipse\").forEach((ref) => {\n const wcsPosition = ref.getAttr(\"wcsPosition\");\n const wcsPosition2 = ref.getAttr(\"wcsRadiusX\");\n const wcsPosition3 = ref.getAttr(\"wcsRadiusY\");\n const stageAbsoluteTransform = this._konvaStage.getAbsoluteTransform();\n const scale = stageAbsoluteTransform.getMatrix()[0];\n\n const shape = new KonvaEllipse(null, ref, this._worldTransformer);\n const ellipse: IEllipse = {\n id: shape.id(),\n position: wcsPosition,\n position2: wcsPosition2,\n position3: wcsPosition3,\n radius: {\n x: ref.getRadiusX() * scale,\n y: ref.getRadiusY() * scale,\n },\n line_width: shape.getLineWidth(),\n color: shape.getColor(),\n };\n\n ellipses.push(ellipse);\n });\n\n return ellipses;\n }\n\n private getMarkupArrows(): Array<IArrow> {\n const arrows = [];\n\n this.konvaLayerFind(\"Arrow\").forEach((ref) => {\n // we need getAbsoluteTransform because inside Konva position starts from {0, 0}\n const wcsStart = ref.getAttr(\"wcsStart\");\n const wcsEnd = ref.getAttr(\"wcsEnd\");\n\n const shape = new KonvaArrow(null, ref, this._worldTransformer);\n const arrow: IArrow = {\n id: shape.id(),\n start: wcsStart,\n end: wcsEnd,\n color: shape.getColor(),\n };\n\n arrows.push(arrow);\n });\n\n return arrows;\n }\n\n private getMarkupImages(): Array<IImage> {\n const images = [];\n\n this.konvaLayerFind(\"Image\").forEach((ref) => {\n const wcsStart = ref.getAttr(\"wcsStart\");\n const wcsEnd = ref.getAttr(\"wcsEnd\");\n const stageAbsoluteTransform = this._konvaStage.getAbsoluteTransform();\n const scale = stageAbsoluteTransform.getMatrix()[0];\n\n const shape = new KonvaImage(null, ref, this._worldTransformer);\n const image: IImage = {\n id: shape.id(),\n position: wcsStart,\n position2: wcsEnd,\n src: shape.getSrc(),\n width: shape.getWidth() * scale,\n height: shape.getHeight() * scale,\n };\n\n images.push(image);\n });\n\n return images;\n }\n\n private getMarkupClouds(): Array<ICloud> {\n const clouds = [];\n\n this.konvaLayerFind(\"Cloud\").forEach((ref) => {\n const wcsStart = ref.getAttr(\"wcsStart\");\n const wcsEnd = ref.getAttr(\"wcsEnd\");\n const screenStart = this._worldTransformer.worldToScreen(wcsStart);\n const screenEnd = this._worldTransformer.worldToScreen(wcsEnd);\n\n const shape = new KonvaCloud(null, ref, this._worldTransformer);\n const cloud: ICloud = {\n id: shape.id(),\n position: wcsStart,\n position2: wcsEnd,\n width: Math.abs(screenStart.x - screenEnd.x),\n height: Math.abs(screenStart.y - screenEnd.y),\n line_width: shape.getLineWidth(),\n color: shape.getColor(),\n };\n\n clouds.push(cloud);\n });\n\n return clouds;\n }\n\n private combineMarkupWithDrawing() {\n this.clearSelected();\n\n const tempCanvas = document.createElement(\"canvas\");\n if (this._konvaStage) {\n tempCanvas.width = this._konvaStage.width();\n tempCanvas.height = this._konvaStage.height();\n\n const ctx = tempCanvas.getContext(\"2d\");\n if (this._container instanceof HTMLCanvasElement) ctx.drawImage(this._container, 0, 0);\n ctx.drawImage(this._konvaStage.toCanvas({ pixelRatio: window.devicePixelRatio }), 0, 0);\n }\n\n return tempCanvas.toDataURL(\"image/jpeg\", 0.25);\n }\n\n private addLine(\n linePoints: number[],\n color?: string,\n type?: MarkupLineType,\n width?: number,\n id?: string\n ): KonvaLine | void {\n if (!linePoints || linePoints.length === 0) return;\n\n const points: { x: number; y: number }[] = [];\n for (let i = 0; i < linePoints.length; i += 2) {\n points.push({ x: linePoints[i], y: linePoints[i + 1] });\n }\n\n const konvaLine = new KonvaLine(\n {\n points,\n type: type || this.lineType,\n width: width || this.lineWidth,\n color: color || this._markupColor.asHex(),\n id,\n },\n null,\n this._worldTransformer\n );\n\n this.addObject(konvaLine);\n return konvaLine;\n }\n\n private createTextInput(pos: Konva.Vector2d, inputX: number, inputY: number, angle: number, text: string): void {\n if (!this._textInputRef) {\n this._textInputPos = pos;\n this._textInputAngle = angle;\n this._textInputRef = document.createElement(\"textarea\");\n this._textInputRef.style.zIndex = \"9999\";\n this._textInputRef.style.position = \"absolute\";\n this._textInputRef.style.display = \"block\";\n this._textInputRef.style.top = inputY + \"px\";\n this._textInputRef.style.left = inputX + \"px\";\n this._textInputRef.style.fontSize = `${this.fontSize}px`;\n this._textInputRef.style.color = `${this._markupColor.asHex()}`;\n this._textInputRef.style.fontFamily = \"Calibri\";\n\n this._textInputRef.onkeydown = (event) => {\n if (event.key === \"Enter\" && !event.shiftKey) {\n event.preventDefault();\n this.addText(this._textInputRef.value, this._textInputPos, this._textInputAngle);\n }\n if (event.key === \"Escape\") {\n event.preventDefault();\n this.removeTextInput();\n }\n };\n if (text) this._textInputRef.value = text;\n document.body.appendChild(this._textInputRef);\n\n setTimeout(() => {\n this._textInputRef.focus();\n }, 50);\n } else {\n this.removeTextInput();\n }\n }\n\n private removeTextInput(): void {\n this._textInputRef?.remove();\n this._textInputRef = null;\n this._textInputPos = null;\n this._textInputAngle = 0;\n }\n\n private createImageInput(pos: Konva.Vector2d): void {\n if (!this._imageInputRef) {\n const convertBase64 = (file) => {\n return new Promise<string | ArrayBuffer>((resolve, reject) => {\n const fileReader = new FileReader();\n fileReader.readAsDataURL(file);\n\n fileReader.onload = () => {\n resolve(fileReader.result);\n };\n\n fileReader.onerror = (error) => {\n reject(error);\n };\n });\n };\n\n this._imageInputPos = pos;\n this._imageInputRef = document.createElement(\"input\");\n this._imageInputRef.style.display = \"none\";\n this._imageInputRef.type = \"file\";\n this._imageInputRef.accept = \"image/png, image/jpeg\";\n this._imageInputRef.onchange = async (event) => {\n const file = (event.target as HTMLInputElement).files[0];\n const base64 = await convertBase64(file);\n this.addImage({ x: this._imageInputPos.x, y: this._imageInputPos.y }, null, base64.toString(), 0, 0);\n };\n this._imageInputRef.oncancel = () => {\n this.removeImageInput();\n };\n document.body.appendChild(this._imageInputRef);\n\n setTimeout(() => {\n this._imageInputRef.click();\n }, 50);\n } else {\n this.removeImageInput();\n }\n }\n\n private removeImageInput(): void {\n this._imageInputRef?.remove();\n this._imageInputRef = null;\n this._imageInputPos = null;\n }\n\n private addText(\n text: string,\n position: Konva.Vector2d,\n angle?: number,\n color?: string,\n textSize?: number,\n fontSize?: number,\n id?: string\n ): KonvaText | void {\n if (!text) return;\n\n // in case of edit - remove old Konva.Text object\n this.getSelectedObjects().shift()?.delete();\n\n this.clearSelected();\n this.removeTextInput();\n\n // in case we have old viewpoint without font_size\n const tolerance = 1.0e-6;\n if (textSize && textSize > tolerance && (!fontSize || fontSize < tolerance)) {\n const size = 0.02;\n const scale = this._worldTransformer.getScale();\n fontSize = textSize / (scale.y / size) / 34;\n }\n\n const konvaText = new KonvaText(\n {\n position: { x: position.x, y: position.y },\n text,\n rotation: angle,\n fontSize: fontSize || this.fontSize,\n color: color || this._markupColor.asHex(),\n id,\n },\n null,\n this._worldTransformer\n );\n\n this.addObject(konvaText);\n return konvaText;\n }\n\n private addRectangle(\n position: Konva.Vector2d,\n position2: Konva.Vector2d,\n width: number,\n height: number,\n lineWidth?: number,\n color?: string,\n id?: string\n ): KonvaRectangle | void {\n if (!position) return;\n\n const konvaRectangle = new KonvaRectangle(\n {\n position,\n position2,\n width,\n height,\n lineWidth: lineWidth || this.lineWidth,\n color: color || this._markupColor.asHex(),\n id,\n },\n null,\n this._worldTransformer\n );\n\n this.addObject(konvaRectangle);\n return konvaRectangle;\n }\n\n private addEllipse(\n position: Konva.Vector2d,\n position2: Konva.Vector2d,\n position3: Konva.Vector2d,\n radius: Konva.Vector2d,\n lineWidth?: number,\n color?: string,\n id?: string\n ): KonvaEllipse | void {\n if (!position) return;\n\n const konvaEllipse = new KonvaEllipse(\n {\n position,\n position2,\n position3,\n radius,\n lineWidth,\n color: color || this._markupColor.asHex(),\n id,\n },\n null,\n this._worldTransformer\n );\n\n this.addObject(konvaEllipse);\n return konvaEllipse;\n }\n\n private addArrow(start: Konva.Vector2d, end: Konva.Vector2d, color?: string, id?: string): KonvaArrow | void {\n if (!start || !end) return;\n\n const konvaArrow = new KonvaArrow(\n {\n start,\n end,\n color: color || this._markupColor.asHex(),\n id,\n },\n null,\n this._worldTransformer\n );\n\n this.addObject(konvaArrow);\n return konvaArrow;\n }\n\n private addCloud(\n position: Konva.Vector2d,\n position2: Konva.Vector2d,\n width: number,\n height: number,\n lineWidth?: number,\n color?: string,\n id?: string\n ): KonvaCloud | void {\n if (!position || !width || !height) return;\n\n const konvaCloud = new KonvaCloud(\n {\n position,\n position2,\n width,\n height,\n color: color || this._markupColor.asHex(),\n lineWidth: lineWidth || this.lineWidth,\n id,\n },\n null,\n this._worldTransformer\n );\n\n this.addObject(konvaCloud);\n return konvaCloud;\n }\n\n private addImage(\n position: Konva.Vector2d,\n position2: Konva.Vector2d,\n src: string,\n width?: number,\n height?: number,\n id?: string\n ): KonvaImage | void {\n if (!position || !src) return;\n\n // in case of edit - remove old Image placeholder object\n this.getSelectedObjects().shift()?.delete();\n\n this.clearSelected();\n this.removeImageInput();\n\n const konvaImage = new KonvaImage(\n {\n position,\n position2,\n src,\n width,\n height,\n maxWidth: this._konvaStage.width() - position.x,\n maxHeight: this._konvaStage.height() - position.y,\n id,\n },\n null,\n this._worldTransformer\n );\n\n this.addObject(konvaImage);\n return konvaImage;\n }\n}\n"],"names":["utils.getDistanceIn2D"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;MAyBa,cAAc,CAAA;AACzB,IAAA,aAAa,CAAC,QAAkC,EAAA;AAC9C,QAAA,OA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