Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: density-based point size #143

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Fix selected point outline width
  • Loading branch information
flekschas committed May 30, 2023
commit fc884698aa318ff342829f9aa75bbbdadbdcdb3b
8 changes: 6 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1703,7 +1703,9 @@ const createScatterplot = (
};

const drawSelectedPointOutlines = drawPoints(
() => (pointSizeSelected + pointOutlineWidth * 2) * window.devicePixelRatio,
() =>
(pointSizeSelected + (pointOutlineWidth / camera.scaling[0]) * 2) *
window.devicePixelRatio,
getSelectedNumPoints,
getSelectedPointsIndexBuffer,
COLOR_ACTIVE_IDX,
Expand All @@ -1712,7 +1714,9 @@ const createScatterplot = (
);

const drawSelectedPointInnerBorder = drawPoints(
() => (pointSizeSelected + pointOutlineWidth) * window.devicePixelRatio,
() =>
(pointSizeSelected + pointOutlineWidth / camera.scaling[0]) *
window.devicePixelRatio,
getSelectedNumPoints,
getSelectedPointsIndexBuffer,
COLOR_BG_IDX,
Expand Down