Inline the HighlightEditor.#telemetryType getter at its only call-site (PR 17748 follow-up)

This commit is contained in:
Jonas Jenwald 2024-02-28 20:47:01 +01:00
parent 9fe15d4a01
commit a92b38e71c

View File

@ -96,7 +96,7 @@ class HighlightEditor extends AnnotationEditor {
get telemetryInitialData() {
return {
action: "added",
type: this.#telemetryType,
type: this.#isFreeHighlight ? "free_highlight" : "highlight",
color: this._uiManager.highlightColorNames.get(this.color),
thickness: this.#thickness,
methodOfCreation: this.#methodOfCreation,
@ -116,10 +116,6 @@ class HighlightEditor extends AnnotationEditor {
return { numberOfColors: data.get("color").size };
}
get #telemetryType() {
return this.#isFreeHighlight ? "free_highlight" : "highlight";
}
#createOutlines() {
const outliner = new Outliner(this.#boxes, /* borderWidth = */ 0.001);
this.#highlightOutlines = outliner.getOutlines();