You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add ability to hover, select, and filter points upon draw() (#142)
* Add ability to hover, select, and filter points upon `draw()`
Also expose `hoveredPoint` via `scatterplot.get('hoveredPoint')`
* Document new `draw()` options
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
-
## Next
1
+
## 1.7.0
2
2
3
+
- Add `preventFilterReset` option to `draw()` to allow re-drawing while keeping the current point filter. [#136](https://github.com/flekschas/regl-scatterplot/pull/136)
4
+
- Add ability to hover, select, and filter points immediately when calling `draw(points, { hover: 0, select: [1, 2], filter: [0, 2, 3] })`. Immediately hovering, selecting, or filtering points avoids a filter that can occur when first drawing points and then hovering, selecting, or filtering points subsequently.
3
5
- Add missing `filteredPoints` type definition. [#139](https://github.com/flekschas/regl-scatterplot/pull/139)
4
6
- Add missing `selectedPoints` type definition.
5
7
- Fix drawing a single connecting line between points [#125](https://github.com/flekschas/regl-scatterplot/issues/125)
Copy file name to clipboardExpand all lines: README.md
+16-3Lines changed: 16 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -299,6 +299,10 @@ Note that repeatedly calling this method without specifying `points` will not cl
299
299
-`transition`[default: `false`]: if `true` and if the current number of points equals `points.length`, the current points will be transitioned to the new points
300
300
-`transitionDuration`[default: `500`]: the duration in milliseconds over which the transition should occur
301
301
-`transitionEasing`[default: `cubicInOut`]: the easing function, which determines how intermediate values of the transition are calculated
302
+
-`preventFilterReset`[default: `false`]: if `true` and if the number of new points is the same as the current number of points, the current point filter will not be reset
303
+
-`hover`[default: `undefined`]: a shortcut for [`hover()`](#scatterplot.hover). This option allows to programmatically hover a point by specifying a point index
304
+
-`select`[default: `undefined`]: a shortcut for [`select()`](#scatterplot.select). This option allows to programmatically select points by specifying a list of point indices
305
+
-`filter`[default: `undefined`]: a shortcut for [`filter()`](#scatterplot.filter). This option allows to programmatically filter points by specifying a list of point indices
302
306
303
307
**Returns:** a Promise object that resolves once the points have been drawn or transitioned.
0 commit comments