Merge pull request #17750 from Snuffleupagus/pr-17748-followup

Inline the `HighlightEditor.#telemetryType` getter at its only call-site (PR 17748 follow-up)
This commit is contained in:
Jonas Jenwald 2024-02-29 10:34:37 +01:00 committed by GitHub
commit 9600c48d4f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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();