Skip to content

Commit e358b16

Browse files
committed
feat: expose isViewChanged in draw, drawing, and view payload
1 parent 4a26470 commit e358b16

File tree

3 files changed

+25
-20
lines changed

3 files changed

+25
-20
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.14.0
2+
3+
- Feat: expose a flag indicating a view change for events `draw`, `drawing`, and `view`
4+
15
## 1.13.2
26

37
- Fix: replace the even-odd rule based with the non-zero winding rule for `isPointInPolygon()` to correctly handle overlapping/looping selections. Previosuly points that would fall within the overlapping area would falsely be excluded from the selection instead of being included.

README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,26 +1051,26 @@ Render Regl draw instructions into a target canvas using the renderer.
10511051

10521052
### Events
10531053

1054-
| Name | Trigger | Payload |
1055-
| -------------------- | ------------------------------------------ | ---------------------------------- |
1056-
| init | when the scatter plot is initialized | `undefined` |
1057-
| destroy | when the scatter plot is destroyed | `undefined` |
1058-
| backgroundImageReady | when the background image was loaded | `undefined` |
1059-
| pointOver | when the mouse cursor is over a point | pointIndex |
1060-
| pointOut | when the mouse cursor moves out of a point | pointIndex |
1061-
| select | when points are selected | `{ points }` |
1062-
| deselect | when points are deselected | `undefined` |
1063-
| filter | when points are filtered | `{ points }` |
1064-
| unfilter | when the point filter is reset | `undefined` |
1065-
| view | when the view has changes | `{ camera, view, xScale, yScale }` |
1066-
| draw | when the plot was drawn | `{ camera, view, xScale, yScale }` |
1067-
| drawing | when the plot is being drawn | `{ camera, view, xScale, yScale }` |
1068-
| lassoStart | when the lasso selection has started | `undefined` |
1069-
| lassoExtend | when the lasso selection has extended | `{ coordinates }` |
1070-
| lassoEnd | when the lasso selection has ended | `{ coordinates }` |
1071-
| transitionStart | when points started to transition | `undefined` |
1072-
| transitionEnd | when points ended to transition | `createRegl(canvas)` |
1073-
| pointConnectionsDraw | when point connections were drawn | `undefined` |
1054+
| Name | Trigger | Payload |
1055+
| -------------------- | ------------------------------------------ | ------------------------------------------------- |
1056+
| init | when the scatter plot is initialized | `undefined` |
1057+
| destroy | when the scatter plot is destroyed | `undefined` |
1058+
| backgroundImageReady | when the background image was loaded | `undefined` |
1059+
| pointOver | when the mouse cursor is over a point | pointIndex |
1060+
| pointOut | when the mouse cursor moves out of a point | pointIndex |
1061+
| select | when points are selected | `{ points }` |
1062+
| deselect | when points are deselected | `undefined` |
1063+
| filter | when points are filtered | `{ points }` |
1064+
| unfilter | when the point filter is reset | `undefined` |
1065+
| view | when the view has changes | `{ camera, view, isViewChanged, xScale, yScale }` |
1066+
| draw | when the plot was drawn | `{ camera, view, isViewChanged, xScale, yScale }` |
1067+
| drawing | when the plot is being drawn | `{ camera, view, isViewChanged, xScale, yScale }` |
1068+
| lassoStart | when the lasso selection has started | `undefined` |
1069+
| lassoExtend | when the lasso selection has extended | `{ coordinates }` |
1070+
| lassoEnd | when the lasso selection has ended | `{ coordinates }` |
1071+
| transitionStart | when points started to transition | `undefined` |
1072+
| transitionEnd | when points ended to transition | `createRegl(canvas)` |
1073+
| pointConnectionsDraw | when point connections were drawn | `undefined` |
10741074

10751075
## Trouble Shooting
10761076

src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4467,6 +4467,7 @@ const createScatterplot = (
44674467

44684468
const renderView = {
44694469
view: camera.view,
4470+
isViewChanged,
44704471
camera,
44714472
xScale,
44724473
yScale,

0 commit comments

Comments
 (0)