Skip to content

Standardizing our use of ctx #41

@jadeddelta

Description

@jadeddelta

Our code uses a bunch of ctx, whether it is updating the canvas, or drawing overlays on it. However, our usage of ctx varies heavily from place to place, using a very inconsistent combination of both this.ctx and canvas.getContext('2d'). This is partly a fault on TypeScript, as if canvas.getContext('2d') returns a ctx, then there's no way that it can return anything else unless a previous type of context was acquired from the ctx. I propose that eventually (definitely not right now), we should cleanup the code and decide how exactly we want to use this.ctx going forward.

Metadata

Metadata

Assignees

No one assigned

    Labels

    low priorityNot necessary to work on now

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions