Skip to content

Commit

Permalink
chore: move properties to the module level
Browse files Browse the repository at this point in the history
  • Loading branch information
BeksOmega committed Jun 1, 2023
1 parent 51691c0 commit e71c897
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/icons/warning_icon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ import {Size} from '../utils.js';
import {Svg} from '../utils/svg.js';
import {TextBubble} from '../bubbles/text_bubble.js';

/** The size of the warning icon in workspace-scale units. */
const SIZE = 17;

export class WarningIcon extends Icon implements IHasBubble {
/** The type string used to identify this icon. */
static readonly TYPE = 'warning';
Expand All @@ -28,9 +31,6 @@ export class WarningIcon extends Icon implements IHasBubble {
*/
static readonly WEIGHT = 2;

/** The size of this icon in workspace-scale units. */
private readonly SIZE = 17;

/** A map of warning IDs to warning text. */
private textMap: Map<string, string> = new Map();

Expand Down Expand Up @@ -93,7 +93,7 @@ export class WarningIcon extends Icon implements IHasBubble {
}

getSize(): Size {
return new Size(this.SIZE, this.SIZE);
return new Size(SIZE, SIZE);
}

applyColour(): void {
Expand Down Expand Up @@ -186,7 +186,7 @@ export class WarningIcon extends Icon implements IHasBubble {
* I.E. the middle of this icon.
*/
private getAnchorLocation(): Coordinate {
const midIcon = this.SIZE / 2;
const midIcon = SIZE / 2;
return Coordinate.sum(
this.workspaceLocation,
new Coordinate(midIcon, midIcon)
Expand Down

0 comments on commit e71c897

Please sign in to comment.