Tweak the new mouseState parameter, and its usage, in the viewer components and the AnnotationLayer

- Actually remove the `isDown` property when destroying the scripting-instance.

 - Mark all `mouseState` usage as "private" in the various classes.

 - Ensure that the `AnnotationLayer` actually treats the parameter as properly *optional*, the same way that the viewer components do.

 - For now remove the `mouseState` parameter from the `PDFPageView` class, and keep it only on the `BaseViewer`, since it's questionable if all of the scripting-functionality will work all that well without e.g. a full `BaseViewer`.

 - Append the `mouseState` to the JSDoc for the `AnnotationElement` class, and just move its definition into the base-`AnnotationElement` class.
This commit is contained in:
Jonas Jenwald 2020-12-17 12:55:58 +01:00
parent e6e2809825
commit 6dc39cb873
5 changed files with 11 additions and 10 deletions

View file

@ -794,6 +794,7 @@ const PDFViewerApplication = {
}
events.clear();
delete this._mouseState.isDown;
this._scriptingInstance = null;
},