box-annotations 5.2.1-beta.1 → 5.2.1-beta.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "box-annotations",
3
- "version": "5.2.1-beta.1",
3
+ "version": "5.2.1-beta.2",
4
4
  "description": "Box Annotations",
5
5
  "author": "Box (https://www.box.com/)",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -136,6 +136,14 @@ export default class BaseAnnotator extends EventEmitter {
136
136
  this.removeListener(Event.VISIBLE_SET, this.handleSetVisible);
137
137
  }
138
138
 
139
+ public getActiveId(): string | null {
140
+ return store.getActiveAnnotationId(this.store.getState());
141
+ }
142
+
143
+ public getAnnotationContainerEl(): HTMLElement | null {
144
+ return this.containerEl ?? null;
145
+ }
146
+
139
147
  public init(scale = 1, rotation = 0): void {
140
148
  this.containerEl = this.getElement(this.container);
141
149
  this.annotatedEl = this.getAnnotatedElement();
@@ -162,6 +170,10 @@ export default class BaseAnnotator extends EventEmitter {
162
170
  return getProp(this.features, feature, false);
163
171
  }
164
172
 
173
+ public isPopupOpen(): boolean {
174
+ return !!this.containerEl?.querySelector('.ba-Popup');
175
+ }
176
+
165
177
  public removeAnnotation = (annotationId: string): void => {
166
178
  this.store.dispatch(store.removeAnnotationAction(annotationId));
167
179
  };