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