Skip to content

Commit

Permalink
Merge pull request #17750 from Snuffleupagus/pr-17748-followup
Browse files Browse the repository at this point in the history
Inline the `HighlightEditor.#telemetryType` getter at its only call-site (PR 17748 follow-up)
  • Loading branch information
Snuffleupagus authored Feb 29, 2024
2 parents 9fe15d4 + a92b38e commit 9600c48
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/display/editor/highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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();
Expand Down

0 comments on commit 9600c48

Please sign in to comment.