Skip to content

Commit 6c796db

Browse files
committed
2 parents a72f7a9 + 9848882 commit 6c796db

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ events.
357357

358358
## Trouble Shooting
359359

360-
#### Resizing and conditionally hiding/showing the scatterplot
360+
#### Resizing the scatterplot
361361

362362
The chances are high that you use the regl-scatterplot in a dynamically-resizable or interactive web-app. Please note that **regl-scatterplot doesn't not automatically resize** when the dimensions of its parent container change. It's your job to keep the size of regl-scatterplot and its parent element in sync. Hence, every time the size of the parent or `canvas` element changed, you have to call:
363363

@@ -366,4 +366,6 @@ const { width, height } = canvas.getBoundingClientRect();
366366
scatterplot.set({ width, height });
367367
```
368368

369-
Importantly, this is also true when you changed the visible of the canvas element from `canvas.hidden = true` to `canvas.hidden = false`!
369+
#### Using regl-scatterplot with Vue
370+
371+
Related to the resizing, when conditionally displaying regl-scatterplot in Vue you might have to update the `width` and `height` when the visibility is changed. See [issue #20](https://github.com/flekschas/regl-scatterplot/issues/20#issuecomment-639377810) for an example.

0 commit comments

Comments
 (0)