Skip to content

Clearer documentation and API for initializing CanvasSpace #12

@mrgreenh

Description

@mrgreenh

I find the documentation for CanvasSpace to be unclear about how to initialize it and call its display() method. The CanvasSpace's id attribute is briefly explained as:
"an id property which refers to the "id" attribute of the canvas element in DOM. If no canvas element with this id is found, a new canvas element will be created."
While the display method's parent_id attribute is described as:
"the DOM element into which the canvas element should be appended".

So right now to select/obtain the canvas element you want to use for pt, you need to write something like CanvasSpace('canvasId').display('#canvasContainer'). I found it very easy to get confused and get it wrong, so I'm just suggesting to add one or two example usages there. And maybe highlight the fact that by default, with no parameters specified, it will simply append a new canvas element to a container with id "pt".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions