Merge pull request #13186 from Snuffleupagus/rm-deprecated-code
Remove some `deprecated` code
This commit is contained in:
commit
5945f7c4a1
@ -13,7 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { deprecated } from "./display_utils.js";
|
||||
import { objectFromMap } from "../shared/util.js";
|
||||
|
||||
/**
|
||||
@ -27,7 +26,7 @@ class AnnotationStorage {
|
||||
// Callbacks to signal when the modification state is set or reset.
|
||||
// This is used by the viewer to only bind on `beforeunload` if forms
|
||||
// are actually edited to prevent doing so unconditionally since that
|
||||
// can have undesirable efffects.
|
||||
// can have undesirable effects.
|
||||
this.onSetModified = null;
|
||||
this.onResetModified = null;
|
||||
}
|
||||
@ -46,19 +45,6 @@ class AnnotationStorage {
|
||||
return obj !== undefined ? obj : defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
getOrCreateValue(key, defaultValue) {
|
||||
deprecated("Use getValue instead.");
|
||||
if (this._storage.has(key)) {
|
||||
return this._storage.get(key);
|
||||
}
|
||||
|
||||
this._storage.set(key, defaultValue);
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value for a given key
|
||||
*
|
||||
|
@ -107,16 +107,6 @@ class PDFLinkService {
|
||||
this.pdfViewer.pagesRotation = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
navigateTo(dest) {
|
||||
console.error(
|
||||
"Deprecated method: `navigateTo`, use `goToDestination` instead."
|
||||
);
|
||||
this.goToDestination(dest);
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
|
@ -155,28 +155,10 @@ class PDFPresentationMode {
|
||||
} else if (this.active) {
|
||||
state = PresentationModeState.FULLSCREEN;
|
||||
}
|
||||
|
||||
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) {
|
||||
this.eventBus.dispatch("presentationmodechanged", {
|
||||
source: this,
|
||||
state,
|
||||
});
|
||||
} else {
|
||||
this.eventBus.dispatch("presentationmodechanged", {
|
||||
source: this,
|
||||
state,
|
||||
get active() {
|
||||
throw new Error(
|
||||
"Deprecated parameter: `active`, please use `state` instead."
|
||||
);
|
||||
},
|
||||
get switchInProgress() {
|
||||
throw new Error(
|
||||
"Deprecated parameter: `switchInProgress`, please use `state` instead."
|
||||
);
|
||||
},
|
||||
});
|
||||
}
|
||||
this.eventBus.dispatch("presentationmodechanged", {
|
||||
source: this,
|
||||
state,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user