pt icon indicating copy to clipboard operation
pt copied to clipboard

CanvasSpace does not set its size

Open mrgreenh opened this issue 8 years ago • 1 comments

When initializing a CanvasSpace on a container that already contains a canvas, the size attribute of the CanvasSpace instance does not get updated with the canvas element's size, resulting in empty renderings. This case should be supported according to documentation ("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."). I'd also see dropping this use case from the docs as a quicker solution.

mrgreenh avatar Jun 02 '16 05:06 mrgreenh

Pt 0.2 has now a new constructor for CanvasSpace and SVGSpace. This will now support existing . Thanks for reporting! http://williamngan.github.io/pt/docs/guide/migration.html

williamngan avatar Jul 20 '16 09:07 williamngan