Skip to content

Use Typescript arrow notation #1

@xperiments

Description

@xperiments

Found in some parts of your code:

var that = this;
image.onload = function () {
that.context.drawImage(image, 32, 32);
};

As you are using Typescript would be better to use arrow notation to preserve context:

image.onload =()=> {
this.context.drawImage(image, 32, 32);
};

Anyway awesome project!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions