@inweb/markup 25.8.20 → 25.8.21

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.
Files changed (41) hide show
  1. package/dist/markup.js +35 -34
  2. package/dist/markup.js.map +1 -1
  3. package/dist/markup.min.js +1 -1
  4. package/dist/markup.module.js +22 -22
  5. package/dist/markup.module.js.map +1 -1
  6. package/lib/index.d.ts +1 -1
  7. package/lib/markup/IMarkup.d.ts +27 -16
  8. package/lib/markup/IMarkupArrow.d.ts +8 -16
  9. package/lib/markup/IMarkupCloud.d.ts +9 -18
  10. package/lib/markup/IMarkupColorable.d.ts +5 -4
  11. package/lib/markup/IMarkupEllipse.d.ts +9 -18
  12. package/lib/markup/IMarkupImage.d.ts +14 -17
  13. package/lib/markup/IMarkupLine.d.ts +44 -11
  14. package/lib/markup/IMarkupObject.d.ts +25 -15
  15. package/lib/markup/IMarkupRectangle.d.ts +9 -18
  16. package/lib/markup/IMarkupText.d.ts +7 -14
  17. package/lib/markup/IWorldTransform.d.ts +1 -1
  18. package/lib/markup/Konva/KonvaLine.d.ts +2 -11
  19. package/lib/markup/Konva/KonvaMarkup.d.ts +2 -2
  20. package/lib/markup/Konva/MarkupColor.d.ts +19 -18
  21. package/package.json +3 -3
  22. package/src/index.ts +1 -1
  23. package/src/markup/IMarkup.ts +28 -16
  24. package/src/markup/IMarkupArrow.ts +8 -16
  25. package/src/markup/IMarkupCloud.ts +9 -18
  26. package/src/markup/IMarkupColorable.ts +5 -4
  27. package/src/markup/IMarkupEllipse.ts +9 -18
  28. package/src/markup/IMarkupImage.ts +14 -17
  29. package/src/markup/IMarkupLine.ts +46 -11
  30. package/src/markup/IMarkupObject.ts +25 -15
  31. package/src/markup/IMarkupRectangle.ts +9 -18
  32. package/src/markup/IMarkupText.ts +7 -14
  33. package/src/markup/IWorldTransform.ts +1 -1
  34. package/src/markup/Konva/KonvaArrow.ts +1 -1
  35. package/src/markup/Konva/KonvaCloud.ts +1 -1
  36. package/src/markup/Konva/KonvaEllipse.ts +1 -1
  37. package/src/markup/Konva/KonvaImage.ts +1 -1
  38. package/src/markup/Konva/KonvaLine.ts +3 -12
  39. package/src/markup/Konva/KonvaMarkup.ts +15 -15
  40. package/src/markup/Konva/KonvaText.ts +1 -1
  41. package/src/markup/Konva/MarkupColor.ts +22 -23
@@ -23,7 +23,7 @@ export interface IMarkup {
23
23
  */
24
24
  lineType: string;
25
25
  /**
26
- * Font size of new markup text, in pixels.
26
+ * Font size of new markup text.
27
27
  *
28
28
  * @default 34
29
29
  */
@@ -34,14 +34,17 @@ export interface IMarkup {
34
34
  * @param container - Container element used to operate on. This is usually a `<canvas>` or
35
35
  * `<div>` on top of which the markup is drawn. If the `container` is a `<canvas>` element,
36
36
  * its content will be combined with the markup in the viewpoint snapshot.
37
- * @param pointerEvents - List of pointing device events that the markup should redirect to
38
- * the `viewer`.
37
+ * @param containerEvents - List of container events, such as mouse events or
38
+ * {@link https://developer.mozilla.org/docs/Web/API/Pointer_events#event_types_and_global_event_handlers | pointer events}
39
+ * or
40
+ * {@link https://developer.mozilla.org/docs/Web/API/TouchEvent#touch_event_types | touch events}
41
+ * that the markup should redirect to the `viewer`.
39
42
  * @param viewer - `Viewer` instance that receives pointing device events.
40
43
  * @param worldTransformer - Transformer of screen space into the `viewer` world space and
41
44
  * vice versa. If a transformer is defined, markup objects will be stored at the viewpoint
42
45
  * in world coordinates, otherwise in screen coordinates.
43
46
  */
44
- initialize(container: HTMLElement, pointerEvents?: string[], viewer?: IEventEmitter, worldTransformer?: IWorldTransform): void;
47
+ initialize(container: HTMLElement, containerEvents?: string[], viewer?: IEventEmitter, worldTransformer?: IWorldTransform): void;
45
48
  /**
46
49
  * Releases all resources allocated by this markup instance.
47
50
  */
@@ -57,9 +60,9 @@ export interface IMarkup {
57
60
  /**
58
61
  * Sets the color of new markup objects.
59
62
  *
60
- * @param r - `Red` part of color.
61
- * @param g - `Green` part of color.
62
- * @param b - `Blue` part of color.
63
+ * @param r - The `red` component of the color, as a number between 0 and 255.
64
+ * @param g - The `green` component of the color, as a number between 0 and 255.
65
+ * @param b - The `blue` component of the color, as a number between 0 and 255.
63
66
  */
64
67
  setMarkupColor(r: number, g: number, b: number): void;
65
68
  /**
@@ -73,17 +76,17 @@ export interface IMarkup {
73
76
  /**
74
77
  * Colors all markup objects with the specified color.
75
78
  *
76
- * @param r - `Red` part of color.
77
- * @param g - `Green` part of color.
78
- * @param b - `Blue` part of color.
79
+ * @param r - The `red` component of the color, as a number between 0 and 255.
80
+ * @param g - The `green` component of the color, as a number between 0 and 255.
81
+ * @param b - The `blue` component of the color, as a number between 0 and 255.
79
82
  */
80
83
  colorizeAllMarkup(r: number, g: number, b: number): void;
81
84
  /**
82
- * Colors selected markup objects with the specified color.
85
+ * Colors the selected markup objects with the specified color.
83
86
  *
84
- * @param r - `Red` part of color.
85
- * @param g - `Green` part of color.
86
- * @param b - `Blue` part of color.
87
+ * @param r - The `red` component of the color, as a number between 0 and 255.
88
+ * @param g - The `green` component of the color, as a number between 0 and 255.
89
+ * @param b - The `blue` component of the color, as a number between 0 and 255.
87
90
  */
88
91
  colorizeSelectedMarkups(r: number, g: number, b: number): void;
89
92
  /**
@@ -108,7 +111,15 @@ export interface IMarkup {
108
111
  *
109
112
  * @param type - Markup object type. Can be `Line`, `Text`, `Rectangle`, `Ellipse`, `Arrow`,
110
113
  * `Image` or `Cloud`.
111
- * @param params - Markup object parameters.
114
+ * @param params - Parameters for creating a markup object. Must match the object type:
115
+ *
116
+ * - `Line` - {@link IMarkupLineParams}
117
+ * - `Text` - {@link IMarkupTextParams}
118
+ * - `Rectangle` - {@link IMarkupRectangleParams}
119
+ * - `Ellipse` - {@link IMarkupEllipseParams}
120
+ * - `Arrow` - {@link IMarkupArrowParams}
121
+ * - `Image` - {@link IMarkupImageParams}
122
+ * - `Cloud` - {@link IMarkupCloudParams}
112
123
  */
113
124
  createObject(type: string, params: any): IMarkupObject;
114
125
  /**
@@ -120,7 +131,7 @@ export interface IMarkup {
120
131
  */
121
132
  getSelectedObjects(): IMarkupObject[];
122
133
  /**
123
- * Selects specified markup objects.
134
+ * Selects the specified markup objects.
124
135
  *
125
136
  * @param objects - The list of markup objects.
126
137
  */
@@ -1,53 +1,45 @@
1
1
  import { IMarkupObject } from "./IMarkupObject";
2
2
  import { IMarkupColorable } from "./IMarkupColorable";
3
3
  /**
4
- * Arrow Markup object
4
+ * 2D markup Arrow object interface.
5
5
  */
6
6
  export interface IMarkupArrow extends IMarkupObject, IMarkupColorable {
7
7
  /**
8
- * Get points of current Arrow
9
- *
10
- * @returns {{ x: number; y: number }} array of points
8
+ * Returns the coordinales of the start and end points of arrow.
11
9
  */
12
10
  getPoints(): {
13
11
  x: number;
14
12
  y: number;
15
13
  }[];
16
14
  /**
17
- * Set points of the Arrow
15
+ * Sets the coordinales of the start and end points of the arrow.
18
16
  *
19
- * @param {{ x: number; y: number }} points - array of points
17
+ * @param {{ x: number; y: number }} points - Array of points.
20
18
  */
21
19
  setPoints(points: {
22
20
  x: number;
23
21
  y: number;
24
22
  }[]): any;
25
23
  /**
26
- * Get Start Point of the Arrow
24
+ * Returns the coordinales of the start point of arrow.
27
25
  */
28
26
  getStartPoint(): {
29
27
  x: number;
30
28
  y: number;
31
29
  };
32
30
  /**
33
- * Set Start point of the Arrow
34
- *
35
- * @param x - value of X coordinate
36
- * @param y - value of Y coordinate
31
+ * Sets the coordinales of the start point of the arrow.
37
32
  */
38
33
  setStartPoint(x: number, y: number): any;
39
34
  /**
40
- * Get End point of the Arrow
35
+ * Returns the coordinales of the end point of arrow.
41
36
  */
42
37
  getEndPoint(): {
43
38
  x: number;
44
39
  y: number;
45
40
  };
46
41
  /**
47
- * Set End point of the Arrow
48
- *
49
- * @param x - value of X coordinate
50
- * @param y - value of Y coordinate
42
+ * Sets the coordinales of the end point of the arrow.
51
43
  */
52
44
  setEndPoint(x: number, y: number): any;
53
45
  }
@@ -1,51 +1,42 @@
1
1
  import { IMarkupObject } from "./IMarkupObject";
2
2
  import { IMarkupColorable } from "./IMarkupColorable";
3
3
  /**
4
- * Cloud Markup object
4
+ * 2D markup Cloud object interface.
5
5
  */
6
6
  export interface IMarkupCloud extends IMarkupObject, IMarkupColorable {
7
7
  /**
8
- * Get position of the Cloud
8
+ * Returns the coordinates of the top-left point (position) of the cloud.
9
9
  */
10
10
  getPosition(): {
11
11
  x: number;
12
12
  y: number;
13
13
  };
14
14
  /**
15
- * Set position of the Cloud
16
- *
17
- * @param x - value of X coordinate
18
- * @param y - value of Y coordinate
15
+ * Sets the coordinates of the top-left point (position) of the cloud.
19
16
  */
20
17
  setPosition(x: number, y: number): any;
21
18
  /**
22
- * Get width of the Cloud. Default value is 200
19
+ * Returns the width of the cloud.
23
20
  */
24
21
  getWidth(): number;
25
22
  /**
26
- * Set width of the Cloud
27
- *
28
- * @param w - value of width. Default value is 200
23
+ * Sets the width of the cloud.
29
24
  */
30
25
  setWidth(w: number): any;
31
26
  /**
32
- * Get height of the Cloud. Default value is 200
27
+ * Returns the height of the cloud.
33
28
  */
34
29
  getHeigth(): number;
35
30
  /**
36
- * Set height of the Cloud
37
- *
38
- * @param h - value of height. Default value is 200
31
+ * Sets the height of the cloud.
39
32
  */
40
33
  setHeight(h: number): any;
41
34
  /**
42
- * Get line width of the Cloud. Defailt value is 4
35
+ * Returns the line width of the cloud.
43
36
  */
44
37
  getLineWidth(): number;
45
38
  /**
46
- * Set line width of the Cloud
47
- *
48
- * @param size - value of width. Defailt value is 4
39
+ * Sets the line width of the cloud.
49
40
  */
50
41
  setLineWidth(size: number): any;
51
42
  }
@@ -1,15 +1,16 @@
1
1
  /**
2
- * Markup Colorable
2
+ * 2D markup colorable object interface.
3
3
  */
4
4
  export interface IMarkupColorable {
5
5
  /**
6
- * Get color of the Markup instance
6
+ * Returns the foreground color of an object's line or text as a string in hexadecimal color
7
+ * syntax `#RGB` using its primary color components (red, green, blue) written as hexadecimal numbers.
7
8
  */
8
9
  getColor(): string;
9
10
  /**
10
- * Set color of the Markup instance
11
+ * Sets the foreground color of an object's line or text.
11
12
  *
12
- * @param hex - color in #hex format. Default: `#ff0000`
13
+ * @param hex - Color in hexadecimal color syntax `#RGB`.
13
14
  */
14
15
  setColor(hex: string): void;
15
16
  }
@@ -1,51 +1,42 @@
1
1
  import { IMarkupObject } from "./IMarkupObject";
2
2
  import { IMarkupColorable } from "./IMarkupColorable";
3
3
  /**
4
- * Ellipse Markup object
4
+ * 2D markup Ellipse object interface.
5
5
  */
6
6
  export interface IMarkupEllipse extends IMarkupObject, IMarkupColorable {
7
7
  /**
8
- * Get position of the Ellipse
8
+ * Returns the coordinates of the center point (position) of the ellipse.
9
9
  */
10
10
  getPosition(): {
11
11
  x: number;
12
12
  y: number;
13
13
  };
14
14
  /**
15
- * Set position of the Ellipse
16
- *
17
- * @param x - value of X coordinate
18
- * @param y - value of Y coordinate
15
+ * Sets the coordinates of the top-left point (position) of the ellipse.
19
16
  */
20
17
  setPosition(x: number, y: number): any;
21
18
  /**
22
- * Get X radius of the Ellipse
19
+ * Returns the X radius of the ellipse.
23
20
  */
24
21
  getRadiusX(): number;
25
22
  /**
26
- * Set X radius of the Ellipse
27
- *
28
- * @param r - value of X radius of the Ellipse
23
+ * Sets the X radius of the ellipse.
29
24
  */
30
25
  setRadiusX(r: number): any;
31
26
  /**
32
- * Get Y radius of the Ellipse
27
+ * Returns the Y radius of the ellipse.
33
28
  */
34
29
  getRadiusY(): number;
35
30
  /**
36
- * Set Y radius of the Ellipse
37
- *
38
- * @param r - value of Y radius of the Ellipse
31
+ * Sets the X radius of the ellipse.
39
32
  */
40
33
  setRadiusY(r: number): any;
41
34
  /**
42
- * Get line width of the Ellipse. Defailt is 4
35
+ * Returns the line width of the ellipse.
43
36
  */
44
37
  getLineWidth(): number;
45
38
  /**
46
- * Set line width of the Ellipse. Default is 4
47
- *
48
- * @param size - value of width
39
+ * Sets the line width of the ellipse.
49
40
  */
50
41
  setLineWidth(size: number): any;
51
42
  }
@@ -1,50 +1,47 @@
1
1
  import { IMarkupObject } from "./IMarkupObject";
2
2
  /**
3
- * Image Markup object
3
+ * 2D markup Image object interface.
4
4
  */
5
5
  export interface IMarkupImage extends IMarkupObject {
6
6
  /**
7
- * Get position of the Image
7
+ * Returns the coordinates of the top-left point (position) of the image.
8
8
  */
9
9
  getPosition(): {
10
10
  x: number;
11
11
  y: number;
12
12
  };
13
13
  /**
14
- * Set position of the Image
15
- *
16
- * @param x - value of X coordinate
17
- * @param y - value of Y coordinate
14
+ * Sets the coordinates of the top-left point (position) of the image.
18
15
  */
19
16
  setPosition(x: number, y: number): any;
20
17
  /**
21
- * Get source of the Image. Provides base64 string
18
+ * Returns the image source as a base64-encoded
19
+ * {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}.
22
20
  */
23
21
  getSrc(): string;
24
22
  /**
25
- * Set source of the Image
23
+ * Sets the image source. External image URL is not supported, only base64-encoded
24
+ * {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URLs}.
26
25
  *
27
- * @param src - string in base64 format
26
+ * @param src - Image source as base64-encoded string.
28
27
  */
29
28
  setSrc(src: string): any;
30
29
  /**
31
- * Get width of the Image
30
+ * Returns the width of the image. The original image is scaled to this width.
32
31
  */
33
32
  getWidth(): number;
34
33
  /**
35
- * Set width of the Image
36
- *
37
- * @param w - value of width. Height will be automatically updated according to ratio of the Image
34
+ * Sets the width of the image. The image height will be automatically updated to match its
35
+ * aspect ratio.
38
36
  */
39
37
  setWidth(w: number): any;
40
38
  /**
41
- * Get height of the Image
39
+ * Returns the height of the image. The original image is scaled to this height.
42
40
  */
43
41
  getHeight(): number;
44
42
  /**
45
- * Set height of the Image
46
- *
47
- * @param h - value of height. Width will be automatically updated according to ratio of the Image
43
+ * Sets the height of the image. The image width will be automatically updated to match its
44
+ * aspect ratio.
48
45
  */
49
46
  setHeight(h: number): any;
50
47
  }
@@ -5,40 +5,73 @@ import { IMarkupColorable } from "./IMarkupColorable";
5
5
  */
6
6
  export type MarkupLineType = "solid" | "dot" | "dash";
7
7
  /**
8
- * Line Markup object
8
+ * 2D markup Line object interface.
9
9
  */
10
10
  export interface IMarkupLine extends IMarkupObject, IMarkupColorable {
11
11
  /**
12
- * Get points of the Line
12
+ * Returns the coordinates of the line points as a flat array [x1, y1, x2, y2, ...].
13
13
  */
14
14
  getPoints(): number[];
15
15
  /**
16
- * Get Line width. Default value is 4
16
+ * Returns the line width.
17
17
  */
18
18
  getLineWidth(): number;
19
19
  /**
20
- * Set Line width. Default value is 4
21
- *
22
- * @param size - value of width
20
+ * Sets the line width.
23
21
  */
24
22
  setLineWidth(size: number): any;
25
23
  /**
26
- * Get Type of the Line. Available values: `solid`, `dot`, `dash`. Default is `solid`
24
+ * Returns the line type. Can be `solid`, `dot` or `dash`.
27
25
  */
28
26
  getLineType(): string;
29
27
  /**
30
- * Set Type of the Line. Available values: `solid`, `dot`, `dash`. Default is `solid`
28
+ * Sets the line type.
31
29
  *
32
- * @param type
30
+ * @param type - Line type. Can be `solid`, `dot` or `dash`.
33
31
  */
34
32
  setLineType(type: string): any;
35
33
  /**
36
- * Add points to the Line
34
+ * Adds the specified points to the end of the line.
37
35
  *
38
- * @param {{ x: number; y: number }} points array of points
36
+ * @param points - Array of 2D points.
39
37
  */
40
38
  addPoints(points: [{
41
39
  x: number;
42
40
  y: number;
43
41
  }]): any;
44
42
  }
43
+ /**
44
+ * Defines the parameters for creating a {@link IMarkupLine | markup line}.
45
+ */
46
+ export interface IMarkupLineParams {
47
+ /**
48
+ * Array of line points.
49
+ */
50
+ points?: {
51
+ x: number;
52
+ y: number;
53
+ }[];
54
+ /**
55
+ * Line type. Can be `solid`, `dot` or `dash`.
56
+ *
57
+ * @default "solid"
58
+ */
59
+ type?: MarkupLineType;
60
+ /**
61
+ * Line width.
62
+ *
63
+ * @default 4
64
+ */
65
+ width?: number;
66
+ /**
67
+ * Line color as a string in hexadecimal color syntax `#RGB` color using its primary color
68
+ * components (red, green, blue) written as hexadecimal numbers.
69
+ *
70
+ * @default "#ff0000"
71
+ */
72
+ color?: string;
73
+ /**
74
+ * Internal markup object identifier.
75
+ */
76
+ id?: string;
77
+ }
@@ -1,47 +1,57 @@
1
1
  /**
2
- * Markup object
2
+ * 2D markup object interface.
3
3
  */
4
4
  export interface IMarkupObject {
5
5
  /**
6
- * Link to Library object (Konva, VisualizeJS)
6
+ * Returns a reference to a core markup library object (Konva, VisualizeJS, etc.).
7
7
  */
8
8
  ref(): any;
9
9
  /**
10
- * Get an internal identificator of the object. Not unique
10
+ * Returns the internal identifier of the object. Not unique.
11
11
  */
12
12
  id(): string;
13
13
  /**
14
- * Set Mouse editing feature
15
- *
16
- * @param value true / false
14
+ * Enables or disables the ability to select and edit an object using the mouse.
17
15
  */
18
- enableMouseEditing(value: boolean): any;
16
+ enableMouseEditing(value: boolean): void;
19
17
  /**
20
- * Get type of the Markup object
18
+ * Returns the type of the object.
21
19
  */
22
20
  type(): string;
23
21
  /**
24
- * Get rotation of the Markup object
22
+ * Returns the rotation angle of the object, in degress.
25
23
  */
26
24
  getRotation(): number;
27
25
  /**
28
- * Set rotation of the Markup object
26
+ * Sets the rotation angle of the object.
29
27
  *
30
- * @param degrees number of degress to rotate
28
+ * @param degrees - Number of degress to rotate.
31
29
  */
32
30
  setRotation(degrees: number): void;
33
31
  /**
34
- * Get Z-Index of the Markup object
32
+ * Returns the Z-index of a object relative to sibling objects that are in the same group.
33
+ *
34
+ * Z-Index is not absolute (like in CSS). It is relative to parent object group only:
35
+ *
36
+ * - `images` - are olways at the bottom
37
+ * - `texts` - are olways on top
38
+ * - `others` - are always between images and texts
35
39
  */
36
40
  getZIndex(): number;
37
41
  /**
38
- * Set Z-Index of the Markup object
42
+ * Sets the Z-index of a object relative to sibling objects that are in the same group.
43
+ *
44
+ * Z-Index is not absolute (like in CSS). It is relative to parent object group only:
45
+ *
46
+ * - `images` - are olways at the bottom
47
+ * - `texts` - are olways on top
48
+ * - `others` - are always between images and texts
39
49
  *
40
- * @param zIndex integer value of Z-Index
50
+ * @param zIndex - An integer value of Z-Index.
41
51
  */
42
52
  setZIndex(zIndex: number): void;
43
53
  /**
44
- * Delete current Markup object
54
+ * Deletes the current object.
45
55
  */
46
56
  delete(): void;
47
57
  }
@@ -1,51 +1,42 @@
1
1
  import { IMarkupObject } from "./IMarkupObject";
2
2
  import { IMarkupColorable } from "./IMarkupColorable";
3
3
  /**
4
- * Rectangle Markup object
4
+ * 2D markup Rectangle object interface.
5
5
  */
6
6
  export interface IMarkupRectangle extends IMarkupObject, IMarkupColorable {
7
7
  /**
8
- * Get position of the Rectangle
8
+ * Returns the coordinates of the top-left point (position) of the rectangle.
9
9
  */
10
10
  getPosition(): {
11
11
  x: number;
12
12
  y: number;
13
13
  };
14
14
  /**
15
- * Set position of the Rectangle
16
- *
17
- * @param x - value of X coordinate
18
- * @param y - value of Y coordinate
15
+ * Sets the coordinates of the top-left point (position) of the rectangle.
19
16
  */
20
17
  setPosition(x: number, y: number): any;
21
18
  /**
22
- * Get width of the Rectangle. Default value is 200
19
+ * Returns the width of the rectangle.
23
20
  */
24
21
  getWidth(): number;
25
22
  /**
26
- * Set width of the Rectangle
27
- *
28
- * @param w - value of width. Default value is 200
23
+ * Sets the width of the rectangle.
29
24
  */
30
25
  setWidth(w: number): any;
31
26
  /**
32
- * Get height of the Rectangle. Default value is 200
27
+ * Returns the height of the rectangle.
33
28
  */
34
29
  getHeigth(): number;
35
30
  /**
36
- * Set height of the Rectangle
37
- *
38
- * @param h - value of height. Default value is 200
31
+ * Sets the height of the rectangle.
39
32
  */
40
33
  setHeight(h: number): any;
41
34
  /**
42
- * Get line width of the Rectangle. Defailt value is 4
35
+ * Returns the line width of the rectangle.
43
36
  */
44
37
  getLineWidth(): number;
45
38
  /**
46
- * Set line width of the Rectangle
47
- *
48
- * @param size - value of width. Defailt value is 4
39
+ * Sets the line width of the rectangle.
49
40
  */
50
41
  setLineWidth(size: number): any;
51
42
  }
@@ -1,41 +1,34 @@
1
1
  import { IMarkupObject } from "./IMarkupObject";
2
2
  import { IMarkupColorable } from "./IMarkupColorable";
3
3
  /**
4
- * Text Markup object
4
+ * 2D markup Text object interface.
5
5
  */
6
6
  export interface IMarkupText extends IMarkupObject, IMarkupColorable {
7
7
  /**
8
- * Get Text value
8
+ * Returns the text string.
9
9
  */
10
10
  getText(): string;
11
11
  /**
12
- * Set Text value
13
- *
14
- * @param text - string value
12
+ * Sets the text string.
15
13
  */
16
14
  setText(text: string): void;
17
15
  /**
18
- * Get position of the Text
16
+ * Returns the coordinates of the top-left point (position) of the text.
19
17
  */
20
18
  getPosition(): {
21
19
  x: number;
22
20
  y: number;
23
21
  };
24
22
  /**
25
- * Set position of the Text
26
- *
27
- * @param x - value of X coordinate
28
- * @param y - value of Y coordinate
23
+ * Sets the coordinates of the top-left point (position) of the text.
29
24
  */
30
25
  setPosition(x: number, y: number): any;
31
26
  /**
32
- * Get font size. Default value is 34
27
+ * Returns the font size of the text.
33
28
  */
34
29
  getFontSize(): any;
35
30
  /**
36
- * Set font size. Default value is 34
37
- *
38
- * @param size
31
+ * Sets the font size of the text.
39
32
  */
40
33
  setFontSize(size: number): any;
41
34
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Viewer coordiate system transformer.
2
+ * Viewer coordiate system transformer interface.
3
3
  */
4
4
  export interface IWorldTransform {
5
5
  /**
@@ -1,16 +1,7 @@
1
- import { IMarkupLine, MarkupLineType } from "../IMarkupLine";
1
+ import { IMarkupLine, IMarkupLineParams } from "../IMarkupLine";
2
2
  export declare class KonvaLine implements IMarkupLine {
3
3
  private _ref;
4
- constructor(params: {
5
- points?: {
6
- x: number;
7
- y: number;
8
- }[];
9
- type?: MarkupLineType;
10
- width?: number;
11
- color?: string;
12
- id?: string;
13
- }, ref?: any);
4
+ constructor(params: IMarkupLineParams, ref?: any);
14
5
  ref(): import("konva/lib/shapes/Line").Line<import("konva/lib/shapes/Line").LineConfig>;
15
6
  id(): string;
16
7
  enableMouseEditing(value: boolean): void;