Skip to content

Commit 08af7a5

Browse files
committed
Fix an issue blurring an active point connection
1 parent b593efb commit 08af7a5

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- Avoid empty lasso events
77
- Fix incorrectly initialized `pointConnectionColorBy`, `pointConnectionOpacityBy`, and `pointConnectionSizeBy`
88
- Fix an issue with the color conversion to RGBA
9+
- Fix an issue blurring an active point connection
910

1011
## v0.16.1
1112

src/index.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1705,7 +1705,7 @@ const createScatterplot = (initialProperties = {}) => {
17051705
return out;
17061706
};
17071707

1708-
const updatePointConnectionsStyle = () => {
1708+
const updatePointConnectionStyle = () => {
17091709
pointConnections.setStyle({
17101710
color: getColors(
17111711
pointConnectionColor,
@@ -1907,7 +1907,7 @@ const createScatterplot = (initialProperties = {}) => {
19071907
const tmpColors = isMultipleColors(newColors) ? newColors : [newColors];
19081908
setter(tmpColors.map((color) => toRgba(color, true)));
19091909
}
1910-
updatePointConnectionsStyle();
1910+
updatePointConnectionStyle();
19111911
};
19121912

19131913
const setPointConnectionColor = setPointConnectionColors(
@@ -1942,7 +1942,7 @@ const createScatterplot = (initialProperties = {}) => {
19421942
return color;
19431943
});
19441944

1945-
updatePointConnectionsStyle();
1945+
updatePointConnectionStyle();
19461946
};
19471947

19481948
const setPointConnectionOpacityActive = (newOpacity) => {
@@ -1961,7 +1961,7 @@ const createScatterplot = (initialProperties = {}) => {
19611961
if (isPositiveNumber(+newPointConnectionSize))
19621962
pointConnectionSize = [+newPointConnectionSize];
19631963

1964-
updatePointConnectionsStyle();
1964+
updatePointConnectionStyle();
19651965
};
19661966

19671967
const setPointConnectionSizeActive = (newPointConnectionSizeActive) => {
@@ -2311,12 +2311,12 @@ const createScatterplot = (initialProperties = {}) => {
23112311
if (!selectionSet.has(point)) setPointConnectionColorState([point], 2);
23122312
if (newHoveredPoint) pubSub.publish('pointover', hoveredPoint);
23132313
} else {
2314-
needsRedraw = hoveredPoint;
2315-
hoveredPoint = undefined;
2316-
if (+needsRedraw >= 0) {
2317-
setPointConnectionColorState([needsRedraw], 0);
2318-
pubSub.publish('pointout', needsRedraw);
2314+
needsRedraw = +hoveredPoint >= 0;
2315+
if (needsRedraw && !selectionSet.has(hoveredPoint)) {
2316+
setPointConnectionColorState([hoveredPoint], 0);
2317+
pubSub.publish('pointout', hoveredPoint);
23192318
}
2319+
hoveredPoint = undefined;
23202320
}
23212321

23222322
if (needsRedraw) drawRaf(null, showRecticleOnce);

0 commit comments

Comments
 (0)