From fa02808f765030a47d2c6f3e41dcf3102b6c00ae Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sat, 22 Aug 2020 20:04:25 +0200 Subject: [PATCH] Mark the `setModified` method, on `AnnotationStorage`, as "private" (PR 12241 follow-up) Since it shouldn't be called manually, we can just mark it as "private". --- src/display/annotation_storage.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/display/annotation_storage.js b/src/display/annotation_storage.js index 96e730223..e1b4fac3a 100644 --- a/src/display/annotation_storage.js +++ b/src/display/annotation_storage.js @@ -58,7 +58,7 @@ class AnnotationStorage { */ setValue(key, value) { if (this._storage.get(key) !== value) { - this.setModified(); + this._setModified(); } this._storage.set(key, value); } @@ -74,7 +74,10 @@ class AnnotationStorage { return this._storage.size; } - setModified() { + /** + * @private + */ + _setModified() { if (!this._modified) { this._modified = true; if (typeof this.onSetModified === "function") {