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".
This commit is contained in:
parent
1f5021d76a
commit
fa02808f76
@ -58,7 +58,7 @@ class AnnotationStorage {
|
|||||||
*/
|
*/
|
||||||
setValue(key, value) {
|
setValue(key, value) {
|
||||||
if (this._storage.get(key) !== value) {
|
if (this._storage.get(key) !== value) {
|
||||||
this.setModified();
|
this._setModified();
|
||||||
}
|
}
|
||||||
this._storage.set(key, value);
|
this._storage.set(key, value);
|
||||||
}
|
}
|
||||||
@ -74,7 +74,10 @@ class AnnotationStorage {
|
|||||||
return this._storage.size;
|
return this._storage.size;
|
||||||
}
|
}
|
||||||
|
|
||||||
setModified() {
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
_setModified() {
|
||||||
if (!this._modified) {
|
if (!this._modified) {
|
||||||
this._modified = true;
|
this._modified = true;
|
||||||
if (typeof this.onSetModified === "function") {
|
if (typeof this.onSetModified === "function") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user