@markerjs/markerjs3 3.0.1 → 3.2.0
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.
- package/markerjs3.d.ts +131 -9
- package/markerjs3.js +1 -1
- package/markerjs3.js.map +1 -1
- package/package.json +1 -1
- package/umd/markerjs3.js +1 -1
- package/umd/markerjs3.js.map +1 -1
package/markerjs3.d.ts
CHANGED
|
@@ -244,6 +244,13 @@ interface AnnotationState {
|
|
|
244
244
|
* Height of the annotation.
|
|
245
245
|
*/
|
|
246
246
|
height: number;
|
|
247
|
+
/**
|
|
248
|
+
* Default SVG filter to apply to markers in the annotation.
|
|
249
|
+
* (e.g. "drop-shadow(2px 2px 2px black)")
|
|
250
|
+
*
|
|
251
|
+
* @since 3.2.0
|
|
252
|
+
*/
|
|
253
|
+
defaultFilter?: string;
|
|
247
254
|
/**
|
|
248
255
|
* Array of marker states for markers in the annotation.
|
|
249
256
|
*/
|
|
@@ -278,6 +285,16 @@ declare class MarkerBase {
|
|
|
278
285
|
* Returns marker type name for the object instance.
|
|
279
286
|
*/
|
|
280
287
|
get typeName(): string;
|
|
288
|
+
/**
|
|
289
|
+
* Marker type title (display name) used for accessibility and other attributes.
|
|
290
|
+
*/
|
|
291
|
+
static title: string;
|
|
292
|
+
/**
|
|
293
|
+
* When true, the default filter is applied to the marker's visual.
|
|
294
|
+
*
|
|
295
|
+
* @since 3.2.0
|
|
296
|
+
*/
|
|
297
|
+
static applyDefaultFilter: boolean;
|
|
281
298
|
/**
|
|
282
299
|
* SVG container object holding the marker's visual.
|
|
283
300
|
*
|
|
@@ -302,10 +319,6 @@ declare class MarkerBase {
|
|
|
302
319
|
* The default marker size when the marker is created with a click (without dragging).
|
|
303
320
|
*/
|
|
304
321
|
defaultSize: ISize;
|
|
305
|
-
/**
|
|
306
|
-
* Marker type title (display name) used for accessibility and other attributes.
|
|
307
|
-
*/
|
|
308
|
-
static title: string;
|
|
309
322
|
/**
|
|
310
323
|
* Marker lifecycle stage.
|
|
311
324
|
*
|
|
@@ -854,6 +867,7 @@ declare class PolygonMarker extends MarkerBase {
|
|
|
854
867
|
selectorVisualLines: SVGLineElement[];
|
|
855
868
|
visibleVisual: SVGGraphicsElement | undefined;
|
|
856
869
|
protected applyStrokeColor(): void;
|
|
870
|
+
protected applyFillColor(): void;
|
|
857
871
|
protected applyStrokeWidth(): void;
|
|
858
872
|
protected applyStrokeDasharray(): void;
|
|
859
873
|
protected applyOpacity(): void;
|
|
@@ -909,6 +923,7 @@ interface FreehandMarkerState extends MarkerBaseState {
|
|
|
909
923
|
declare class FreehandMarker extends MarkerBase {
|
|
910
924
|
static typeName: string;
|
|
911
925
|
static title: string;
|
|
926
|
+
static applyDefaultFilter: boolean;
|
|
912
927
|
/**
|
|
913
928
|
* Points of the freehand line.
|
|
914
929
|
*/
|
|
@@ -1250,6 +1265,7 @@ declare class TextMarker extends RectangularBoxMarkerBase {
|
|
|
1250
1265
|
declare class CoverMarker extends ShapeMarkerBase {
|
|
1251
1266
|
static typeName: string;
|
|
1252
1267
|
static title: string;
|
|
1268
|
+
static applyDefaultFilter: boolean;
|
|
1253
1269
|
constructor(container: SVGGElement);
|
|
1254
1270
|
protected getPath(width?: number, height?: number): string;
|
|
1255
1271
|
}
|
|
@@ -1263,6 +1279,7 @@ declare class CoverMarker extends ShapeMarkerBase {
|
|
|
1263
1279
|
declare class HighlightMarker extends ShapeMarkerBase {
|
|
1264
1280
|
static typeName: string;
|
|
1265
1281
|
static title: string;
|
|
1282
|
+
static applyDefaultFilter: boolean;
|
|
1266
1283
|
constructor(container: SVGGElement);
|
|
1267
1284
|
protected getPath(width?: number, height?: number): string;
|
|
1268
1285
|
}
|
|
@@ -1556,6 +1573,54 @@ declare class CaptionFrameMarker extends TextMarker {
|
|
|
1556
1573
|
scale(scaleX: number, scaleY: number): void;
|
|
1557
1574
|
}
|
|
1558
1575
|
|
|
1576
|
+
interface CurveMarkerState extends LinearMarkerBaseState {
|
|
1577
|
+
/**
|
|
1578
|
+
* x coordinate for the curve control point.
|
|
1579
|
+
*/
|
|
1580
|
+
curveX: number;
|
|
1581
|
+
/**
|
|
1582
|
+
* y coordinate for the curve control point.
|
|
1583
|
+
*/
|
|
1584
|
+
curveY: number;
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
/**
|
|
1588
|
+
* Curve marker represents a curved line.
|
|
1589
|
+
*
|
|
1590
|
+
* @summary Curve marker.
|
|
1591
|
+
* @group Markers
|
|
1592
|
+
*/
|
|
1593
|
+
declare class CurveMarker extends LineMarker {
|
|
1594
|
+
static typeName: string;
|
|
1595
|
+
static title: string;
|
|
1596
|
+
/**
|
|
1597
|
+
* x coordinate for the curve control point.
|
|
1598
|
+
*/
|
|
1599
|
+
curveX: number;
|
|
1600
|
+
/**
|
|
1601
|
+
* y coordinate for the curve control point.
|
|
1602
|
+
*/
|
|
1603
|
+
curveY: number;
|
|
1604
|
+
constructor(container: SVGGElement);
|
|
1605
|
+
protected getPath(): string;
|
|
1606
|
+
getState(): CurveMarkerState;
|
|
1607
|
+
restoreState(state: CurveMarkerState): void;
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
/**
|
|
1611
|
+
* Highlighter marker imitates a freeform highlighter pen.
|
|
1612
|
+
*
|
|
1613
|
+
* @summary Semi-transparent freeform marker.
|
|
1614
|
+
* @group Markers
|
|
1615
|
+
* @since 3.2.0
|
|
1616
|
+
*/
|
|
1617
|
+
declare class HighlighterMarker extends FreehandMarker {
|
|
1618
|
+
static typeName: string;
|
|
1619
|
+
static title: string;
|
|
1620
|
+
static applyDefaultFilter: boolean;
|
|
1621
|
+
constructor(container: SVGGElement);
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1559
1624
|
/**
|
|
1560
1625
|
* Properties for marker editor.
|
|
1561
1626
|
*/
|
|
@@ -2021,6 +2086,20 @@ declare class MarkerArea extends HTMLElement {
|
|
|
2021
2086
|
private prevPanPoint;
|
|
2022
2087
|
private panTo;
|
|
2023
2088
|
private undoRedoManager;
|
|
2089
|
+
private _defaultFilter?;
|
|
2090
|
+
/**
|
|
2091
|
+
* Returns the default SVG filter for the created markers.
|
|
2092
|
+
*
|
|
2093
|
+
* @since 3.2.0
|
|
2094
|
+
*/
|
|
2095
|
+
get defaultFilter(): string | undefined;
|
|
2096
|
+
/**
|
|
2097
|
+
* Sets the default SVG filter for the created markers
|
|
2098
|
+
* (e.g. "drop-shadow(2px 2px 2px black)").
|
|
2099
|
+
*
|
|
2100
|
+
* @since 3.2.0
|
|
2101
|
+
*/
|
|
2102
|
+
set defaultFilter(value: string | undefined);
|
|
2024
2103
|
constructor();
|
|
2025
2104
|
private connectedCallback;
|
|
2026
2105
|
private disconnectedCallback;
|
|
@@ -2369,10 +2448,6 @@ declare class LinearMarkerEditor<TMarkerType extends LinearMarkerBase = LinearMa
|
|
|
2369
2448
|
private manipulationStartY1;
|
|
2370
2449
|
private manipulationStartX2;
|
|
2371
2450
|
private manipulationStartY2;
|
|
2372
|
-
/**
|
|
2373
|
-
* Container for control elements.
|
|
2374
|
-
*/
|
|
2375
|
-
protected controlBox: SVGGElement;
|
|
2376
2451
|
/**
|
|
2377
2452
|
* Container for manipulation grips.
|
|
2378
2453
|
*/
|
|
@@ -2770,6 +2845,25 @@ declare class CaptionFrameMarkerEditor<TMarkerType extends CaptionFrameMarker =
|
|
|
2770
2845
|
protected setSize(): void;
|
|
2771
2846
|
}
|
|
2772
2847
|
|
|
2848
|
+
declare class CurveMarkerEditor<TMarkerType extends CurveMarker = CurveMarker> extends LinearMarkerEditor<TMarkerType> {
|
|
2849
|
+
/**
|
|
2850
|
+
* Curve manipulation grip.
|
|
2851
|
+
*/
|
|
2852
|
+
protected curveGrip?: ResizeGrip;
|
|
2853
|
+
private manipulationStartCurveX;
|
|
2854
|
+
private manipulationStartCurveY;
|
|
2855
|
+
private curveControlLine1?;
|
|
2856
|
+
private curveControlLine2?;
|
|
2857
|
+
ownsTarget(el: EventTarget): boolean;
|
|
2858
|
+
pointerDown(point: IPoint, target?: EventTarget): void;
|
|
2859
|
+
protected resize(point: IPoint): void;
|
|
2860
|
+
manipulate(point: IPoint): void;
|
|
2861
|
+
protected setupControlBox(): void;
|
|
2862
|
+
protected adjustControlBox(): void;
|
|
2863
|
+
protected addControlGrips(): void;
|
|
2864
|
+
protected positionGrips(): void;
|
|
2865
|
+
}
|
|
2866
|
+
|
|
2773
2867
|
/**
|
|
2774
2868
|
* Event map for {@link MarkerView}.
|
|
2775
2869
|
*/
|
|
@@ -2907,6 +3001,20 @@ declare class MarkerView extends HTMLElement {
|
|
|
2907
3001
|
* Sets the current zoom level.
|
|
2908
3002
|
*/
|
|
2909
3003
|
set zoomLevel(value: number);
|
|
3004
|
+
private _defaultFilter?;
|
|
3005
|
+
/**
|
|
3006
|
+
* Returns the default SVG filter for the created markers.
|
|
3007
|
+
*
|
|
3008
|
+
* @since 3.2.0
|
|
3009
|
+
*/
|
|
3010
|
+
get defaultFilter(): string | undefined;
|
|
3011
|
+
/**
|
|
3012
|
+
* Sets the default SVG filter for the created markers
|
|
3013
|
+
* (e.g. "drop-shadow(2px 2px 2px black)").
|
|
3014
|
+
*
|
|
3015
|
+
* @since 3.2.0
|
|
3016
|
+
*/
|
|
3017
|
+
set defaultFilter(value: string | undefined);
|
|
2910
3018
|
private _isInitialized;
|
|
2911
3019
|
constructor();
|
|
2912
3020
|
private connectedCallback;
|
|
@@ -3054,6 +3162,20 @@ declare class Renderer {
|
|
|
3054
3162
|
* Both `width` and `height` have to be set for this to take effect.
|
|
3055
3163
|
*/
|
|
3056
3164
|
height?: number;
|
|
3165
|
+
private _defaultFilter?;
|
|
3166
|
+
/**
|
|
3167
|
+
* Returns the default SVG filter for the created markers.
|
|
3168
|
+
*
|
|
3169
|
+
* @since 3.2.0
|
|
3170
|
+
*/
|
|
3171
|
+
get defaultFilter(): string | undefined;
|
|
3172
|
+
/**
|
|
3173
|
+
* Sets the default SVG filter for the created markers
|
|
3174
|
+
* (e.g. "drop-shadow(2px 2px 2px black)").
|
|
3175
|
+
*
|
|
3176
|
+
* @since 3.2.0
|
|
3177
|
+
*/
|
|
3178
|
+
set defaultFilter(value: string | undefined);
|
|
3057
3179
|
constructor();
|
|
3058
3180
|
private init;
|
|
3059
3181
|
private addMainCanvas;
|
|
@@ -3082,4 +3204,4 @@ declare class Renderer {
|
|
|
3082
3204
|
rasterize(state: AnnotationState, targetCanvas?: HTMLCanvasElement): Promise<string>;
|
|
3083
3205
|
}
|
|
3084
3206
|
|
|
3085
|
-
export { Activator, type AnnotationState, ArrowMarker, ArrowMarkerEditor, type ArrowMarkerState, type ArrowType, type BlurHandler, CalloutMarker, CalloutMarkerEditor, type CalloutMarkerState, CaptionFrameMarker, CaptionFrameMarkerEditor, type CaptionFrameMarkerState, CheckImageMarker, CoverMarker, CustomImageMarker, EllipseFrameMarker, EllipseMarker, type FontSize, FrameMarker, FreehandMarker, FreehandMarkerEditor, type FreehandMarkerState, Grip, type GripLocation, HighlightMarker, type IPoint, type ISize, type ITransformMatrix, ImageMarkerBase, type ImageMarkerBaseState, ImageMarkerEditor, type ImageType, LineMarker, LinearMarkerBase, type LinearMarkerBaseState, LinearMarkerEditor, MarkerArea, type MarkerAreaEventData, type MarkerAreaEventMap, type MarkerAreaMode, MarkerBase, MarkerBaseEditor, type MarkerBaseState, type MarkerCreationStyle, type MarkerEditorEventData, type MarkerEditorProperties, type MarkerEditorState, type MarkerEventData, type MarkerStage, MarkerView, type MarkerViewEventData, type MarkerViewEventMap, MeasurementMarker, PolygonMarker, PolygonMarkerEditor, type PolygonMarkerState, RectangularBoxMarkerBase, type RectangularBoxMarkerBaseState, Renderer, ResizeGrip, RotateGrip, ShapeMarkerBase, type ShapeMarkerBaseState, ShapeMarkerEditor, ShapeOutlineMarkerBase, type ShapeOutlineMarkerBaseState, ShapeOutlineMarkerEditor, SvgHelper, TextBlock, TextBlockEditor, type TextChangedHandler, TextMarker, TextMarkerEditor, type TextMarkerState, XImageMarker };
|
|
3207
|
+
export { Activator, type AnnotationState, ArrowMarker, ArrowMarkerEditor, type ArrowMarkerState, type ArrowType, type BlurHandler, CalloutMarker, CalloutMarkerEditor, type CalloutMarkerState, CaptionFrameMarker, CaptionFrameMarkerEditor, type CaptionFrameMarkerState, CheckImageMarker, CoverMarker, CurveMarker, CurveMarkerEditor, type CurveMarkerState, CustomImageMarker, EllipseFrameMarker, EllipseMarker, type FontSize, FrameMarker, FreehandMarker, FreehandMarkerEditor, type FreehandMarkerState, Grip, type GripLocation, HighlightMarker, HighlighterMarker, type IPoint, type ISize, type ITransformMatrix, ImageMarkerBase, type ImageMarkerBaseState, ImageMarkerEditor, type ImageType, LineMarker, LinearMarkerBase, type LinearMarkerBaseState, LinearMarkerEditor, MarkerArea, type MarkerAreaEventData, type MarkerAreaEventMap, type MarkerAreaMode, MarkerBase, MarkerBaseEditor, type MarkerBaseState, type MarkerCreationStyle, type MarkerEditorEventData, type MarkerEditorProperties, type MarkerEditorState, type MarkerEventData, type MarkerStage, MarkerView, type MarkerViewEventData, type MarkerViewEventMap, MeasurementMarker, PolygonMarker, PolygonMarkerEditor, type PolygonMarkerState, RectangularBoxMarkerBase, type RectangularBoxMarkerBaseState, Renderer, ResizeGrip, RotateGrip, ShapeMarkerBase, type ShapeMarkerBaseState, ShapeMarkerEditor, ShapeOutlineMarkerBase, type ShapeOutlineMarkerBaseState, ShapeOutlineMarkerEditor, SvgHelper, TextBlock, TextBlockEditor, type TextChangedHandler, TextMarker, TextMarkerEditor, type TextMarkerState, XImageMarker };
|