@markerjs/markerjs3 3.6.3 → 3.6.4
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 +138 -2
- 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
|
@@ -1948,58 +1948,139 @@ declare class MarkerBaseEditor<TMarkerType extends MarkerBase = MarkerBase> {
|
|
|
1948
1948
|
|
|
1949
1949
|
/**
|
|
1950
1950
|
* Marker area custom event types.
|
|
1951
|
+
*
|
|
1952
|
+
* @summary
|
|
1953
|
+
* Defines the custom events that can be dispatched by the {@link MarkerArea} component.
|
|
1954
|
+
*
|
|
1955
|
+
* @remarks
|
|
1956
|
+
* The `MarkerAreaEventMap` interface defines the events that can be dispatched by the {@link MarkerArea} component.
|
|
1957
|
+
*
|
|
1958
|
+
* You can listen to these events using the {@link MarkerArea.addEventListener | addEventListener} method on the {@link MarkerArea} instance.
|
|
1959
|
+
*
|
|
1960
|
+
* The events can be logically grouped into two categories:
|
|
1961
|
+
* 1. Marker area events (start with `area`)
|
|
1962
|
+
* 2. Marker editor events (start with `marker`).
|
|
1963
|
+
*
|
|
1964
|
+
* The marker area events are related to the overall state of the {@link MarkerArea} component,
|
|
1965
|
+
* while the marker editor events are related to the individual marker editors within the area.
|
|
1966
|
+
*
|
|
1967
|
+
* Marker area events receive {@link MarkerAreaEventData} as their `event.detail`,
|
|
1968
|
+
* while marker editor events receive {@link MarkerEditorEventData} as their `event.detail`.
|
|
1969
|
+
* Both event data types contain a reference to the {@link MarkerArea} instance
|
|
1970
|
+
* and, for marker editor events, a reference to the specific marker editor that triggered the event.
|
|
1951
1971
|
*/
|
|
1952
1972
|
interface MarkerAreaEventMap {
|
|
1953
1973
|
/**
|
|
1954
1974
|
* Marker area initialized.
|
|
1975
|
+
*
|
|
1976
|
+
* @remarks
|
|
1977
|
+
* This event is dispatched early in the lifecycle when the {@link MarkerArea} component is initialized
|
|
1978
|
+
* but none of its internal elements have been created yet.
|
|
1979
|
+
*
|
|
1980
|
+
* Use {@link areashow} to know when the component is fully initialized and ready to be used.
|
|
1955
1981
|
*/
|
|
1956
1982
|
areainit: CustomEvent<MarkerAreaEventData>;
|
|
1957
1983
|
/**
|
|
1958
1984
|
* Marker area shown.
|
|
1985
|
+
*
|
|
1986
|
+
* @remarks
|
|
1987
|
+
* This event is dispatched when the {@link MarkerArea} component is fully initialized and ready to be used.
|
|
1959
1988
|
*/
|
|
1960
1989
|
areashow: CustomEvent<MarkerAreaEventData>;
|
|
1961
1990
|
/**
|
|
1962
1991
|
* Marker area state restored.
|
|
1992
|
+
*
|
|
1993
|
+
* @remarks
|
|
1994
|
+
* This event is dispatched when the {@link MarkerArea} component restores its state from
|
|
1995
|
+
* a previously saved state.
|
|
1963
1996
|
*/
|
|
1964
1997
|
arearestorestate: CustomEvent<MarkerAreaEventData>;
|
|
1965
1998
|
/**
|
|
1966
1999
|
* Marker area focused.
|
|
2000
|
+
*
|
|
2001
|
+
* @remarks
|
|
2002
|
+
* This event is dispatched when the {@link MarkerArea} component receives focus.
|
|
1967
2003
|
*/
|
|
1968
2004
|
areafocus: CustomEvent<MarkerAreaEventData>;
|
|
1969
2005
|
/**
|
|
1970
2006
|
* Marker area lost focus.
|
|
2007
|
+
*
|
|
2008
|
+
* @remarks
|
|
2009
|
+
* This event is dispatched when the {@link MarkerArea} component loses focus.
|
|
1971
2010
|
*/
|
|
1972
2011
|
areablur: CustomEvent<MarkerAreaEventData>;
|
|
1973
2012
|
/**
|
|
1974
2013
|
* Marker area state changed.
|
|
2014
|
+
*
|
|
2015
|
+
* @remarks
|
|
2016
|
+
* This event is dispatched when the {@link MarkerArea} component's state changes.
|
|
2017
|
+
*
|
|
2018
|
+
* This is a good place to implement auto-saving or update the UI based on the current state.
|
|
1975
2019
|
*/
|
|
1976
2020
|
areastatechange: CustomEvent<MarkerAreaEventData>;
|
|
1977
2021
|
/**
|
|
1978
2022
|
* Marker selected.
|
|
2023
|
+
*
|
|
2024
|
+
* @remarks
|
|
2025
|
+
* This event is dispatched when a marker editor is selected.
|
|
2026
|
+
* You can use this event to update the UI or perform actions based on the selected marker editor.
|
|
1979
2027
|
*/
|
|
1980
2028
|
markerselect: CustomEvent<MarkerEditorEventData>;
|
|
1981
2029
|
/**
|
|
1982
2030
|
* Marker deselected.
|
|
2031
|
+
*
|
|
2032
|
+
* @remarks
|
|
2033
|
+
* This event is dispatched when a marker editor is deselected.
|
|
2034
|
+
* You can use this event to update the UI or perform actions based on the deselected marker editor.
|
|
1983
2035
|
*/
|
|
1984
2036
|
markerdeselect: CustomEvent<MarkerEditorEventData>;
|
|
1985
2037
|
/**
|
|
1986
2038
|
* Marker creating.
|
|
2039
|
+
*
|
|
2040
|
+
* @remarks
|
|
2041
|
+
* This event is dispatched when a marker creation has been initiated.
|
|
2042
|
+
* You can use this event to update the UI or perform actions based on the marker creation process.
|
|
1987
2043
|
*/
|
|
1988
2044
|
markercreating: CustomEvent<MarkerEditorEventData>;
|
|
1989
2045
|
/**
|
|
1990
2046
|
* Marker created.
|
|
2047
|
+
*
|
|
2048
|
+
* @remarks
|
|
2049
|
+
* This event is dispatched when a marker has been created.
|
|
2050
|
+
* You can use this event to update the UI or perform actions based on the created marker editor.
|
|
2051
|
+
*
|
|
2052
|
+
* One common use case is implementing continuous marker creation,
|
|
2053
|
+
* where you create a new marker editor immediately after the previous one has been created.
|
|
2054
|
+
*
|
|
2055
|
+
* @example
|
|
2056
|
+
* ```js
|
|
2057
|
+
* // create another marker of the same type
|
|
2058
|
+
* markerArea.addEventListener("markercreate", (ev) => {
|
|
2059
|
+
* markerArea.createMarker(ev.detail.markerEditor.marker.typeName);
|
|
2060
|
+
* });
|
|
2061
|
+
* ```
|
|
1991
2062
|
*/
|
|
1992
2063
|
markercreate: CustomEvent<MarkerEditorEventData>;
|
|
1993
2064
|
/**
|
|
1994
2065
|
* Marker about to be deleted.
|
|
2066
|
+
*
|
|
2067
|
+
* @remarks
|
|
2068
|
+
* This event is dispatched before a marker editor is deleted.
|
|
1995
2069
|
*/
|
|
1996
2070
|
markerbeforedelete: CustomEvent<MarkerEditorEventData>;
|
|
1997
2071
|
/**
|
|
1998
2072
|
* Marker deleted.
|
|
2073
|
+
*
|
|
2074
|
+
* @remarks
|
|
2075
|
+
* This event is dispatched after a marker editor is deleted.
|
|
2076
|
+
* You can use this event to update the UI or perform actions based on the deleted marker editor.
|
|
1999
2077
|
*/
|
|
2000
2078
|
markerdelete: CustomEvent<MarkerEditorEventData>;
|
|
2001
2079
|
/**
|
|
2002
2080
|
* Marker changed.
|
|
2081
|
+
*
|
|
2082
|
+
* @remarks
|
|
2083
|
+
* This event is dispatched when a marker editor's state has changed.
|
|
2003
2084
|
*/
|
|
2004
2085
|
markerchange: CustomEvent<MarkerEditorEventData>;
|
|
2005
2086
|
}
|
|
@@ -2827,7 +2908,7 @@ declare class TextBlockEditor {
|
|
|
2827
2908
|
* Returns editor's UI,
|
|
2828
2909
|
* @returns UI in a div element.
|
|
2829
2910
|
*/
|
|
2830
|
-
getEditorUi():
|
|
2911
|
+
getEditorUi(): HTMLTextAreaElement;
|
|
2831
2912
|
/**
|
|
2832
2913
|
* Focuses text editing in the editor.
|
|
2833
2914
|
*/
|
|
@@ -2969,47 +3050,102 @@ declare class CurveMarkerEditor<TMarkerType extends CurveMarker = CurveMarker> e
|
|
|
2969
3050
|
}
|
|
2970
3051
|
|
|
2971
3052
|
/**
|
|
2972
|
-
*
|
|
3053
|
+
* Marker view custom event types.
|
|
3054
|
+
*
|
|
3055
|
+
* @summary
|
|
3056
|
+
* Defines the custom events that can be dispatched by the {@link MarkerView} component.
|
|
3057
|
+
*
|
|
3058
|
+
* @remarks
|
|
3059
|
+
* The `MarkerViewEventMap` interface defines the events that can be dispatched by the {@link MarkerView} component.
|
|
3060
|
+
*
|
|
3061
|
+
* You can listen to these events using the {@link MarkerView.addEventListener | addEventListener} method on the {@link MarkerView} instance.
|
|
3062
|
+
*
|
|
3063
|
+
* The events can be logically grouped into two categories:
|
|
3064
|
+
* 1. Marker view events (start with `view`)
|
|
3065
|
+
* 2. Marker events (start with `marker`).
|
|
3066
|
+
*
|
|
3067
|
+
* The marker view events are related to the overall state of the {@link MarkerView} component,
|
|
3068
|
+
* while the marker events are related to the individual markers within the view.
|
|
3069
|
+
*
|
|
3070
|
+
* Marker view events receive {@link MarkerViewEventData} as their `event.detail`,
|
|
3071
|
+
* while marker events receive {@link MarkerEventData} as their `event.detail`.
|
|
3072
|
+
* Both event data types contain a reference to the {@link MarkerView} instance
|
|
3073
|
+
* and, for marker events, a reference to the specific marker that triggered the event.
|
|
2973
3074
|
*/
|
|
2974
3075
|
interface MarkerViewEventMap {
|
|
2975
3076
|
/**
|
|
2976
3077
|
* Viewer initialized.
|
|
3078
|
+
*
|
|
3079
|
+
* @remarks
|
|
3080
|
+
* This event is dispatched when the {@link MarkerView} instance is created and initialized
|
|
3081
|
+
* but none of its internal elements have been created yet.
|
|
2977
3082
|
*/
|
|
2978
3083
|
viewinit: CustomEvent<MarkerViewEventData>;
|
|
2979
3084
|
/**
|
|
2980
3085
|
* Viewer shown.
|
|
3086
|
+
*
|
|
3087
|
+
* @remarks
|
|
3088
|
+
* This event is dispatched when the {@link MarkerView} instance is fully initialized,
|
|
3089
|
+
* its internal elements are created, and the target image is loaded.
|
|
3090
|
+
* It indicates that the viewer is ready to display markers and annotations.
|
|
2981
3091
|
*/
|
|
2982
3092
|
viewshow: CustomEvent<MarkerViewEventData>;
|
|
2983
3093
|
/**
|
|
2984
3094
|
* Viewer state restored.
|
|
3095
|
+
*
|
|
3096
|
+
* @remarks
|
|
3097
|
+
* This event is dispatched when the {@link MarkerView} instance has restored a previously saved state.
|
|
3098
|
+
* It indicates that the viewer has loaded markers and annotations from a saved state.
|
|
2985
3099
|
*/
|
|
2986
3100
|
viewrestorestate: CustomEvent<MarkerViewEventData>;
|
|
2987
3101
|
/**
|
|
2988
3102
|
* Marker clicked.
|
|
3103
|
+
*
|
|
3104
|
+
* @remarks
|
|
3105
|
+
* This event is dispatched when a marker within the {@link MarkerView} is clicked.
|
|
3106
|
+
* It provides access to the clicked marker and the {@link MarkerView} instance.
|
|
2989
3107
|
*/
|
|
2990
3108
|
markerclick: CustomEvent<MarkerEventData>;
|
|
2991
3109
|
/**
|
|
2992
3110
|
* Marker mouse over.
|
|
3111
|
+
*
|
|
3112
|
+
* @remarks
|
|
3113
|
+
* This event is dispatched when the mouse pointer hovers over a marker within the {@link MarkerView}.
|
|
2993
3114
|
*/
|
|
2994
3115
|
markerover: CustomEvent<MarkerEventData>;
|
|
2995
3116
|
/**
|
|
2996
3117
|
* Marker pointer down.
|
|
3118
|
+
*
|
|
3119
|
+
* @remarks
|
|
3120
|
+
* This event is dispatched when a pointer (mouse, touch, etc.) is pressed down on a marker within the {@link MarkerView}.
|
|
2997
3121
|
*/
|
|
2998
3122
|
markerpointerdown: CustomEvent<MarkerEventData>;
|
|
2999
3123
|
/**
|
|
3000
3124
|
* Marker pointer move.
|
|
3125
|
+
*
|
|
3126
|
+
* @remarks
|
|
3127
|
+
* This event is dispatched when a pointer (mouse, touch, etc.) moves while over a marker within the {@link MarkerView}.
|
|
3001
3128
|
*/
|
|
3002
3129
|
markerpointermove: CustomEvent<MarkerEventData>;
|
|
3003
3130
|
/**
|
|
3004
3131
|
* Marker pointer up.
|
|
3132
|
+
*
|
|
3133
|
+
* @remarks
|
|
3134
|
+
* This event is dispatched when a pointer (mouse, touch, etc.) is released after being pressed down on a marker within the {@link MarkerView}.
|
|
3005
3135
|
*/
|
|
3006
3136
|
markerpointerup: CustomEvent<MarkerEventData>;
|
|
3007
3137
|
/**
|
|
3008
3138
|
* Marker pointer enter.
|
|
3139
|
+
*
|
|
3140
|
+
* @remarks
|
|
3141
|
+
* This event is dispatched when a pointer (mouse, touch, etc.) enters the area of a marker within the {@link MarkerView}.
|
|
3009
3142
|
*/
|
|
3010
3143
|
markerpointerenter: CustomEvent<MarkerEventData>;
|
|
3011
3144
|
/**
|
|
3012
3145
|
* Marker pointer leave.
|
|
3146
|
+
*
|
|
3147
|
+
* @remarks
|
|
3148
|
+
* This event is dispatched when a pointer (mouse, touch, etc.) leaves the area of a marker within the {@link MarkerView}.
|
|
3013
3149
|
*/
|
|
3014
3150
|
markerpointerleave: CustomEvent<MarkerEventData>;
|
|
3015
3151
|
}
|