Skip to content

Commit

Permalink
feat(ScatterPlot): dark gray for selected points
Browse files Browse the repository at this point in the history
Light gray for unselected points. Was light blue for unselected points, light gray for selected.
  • Loading branch information
PaulHax committed Sep 30, 2024
1 parent f8f524f commit 2391c3e
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions vue-components/src/components/ScatterPlot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import type { ColorMap } from '@colormap/core'
import type { Vector3, Vector2 } from '../types'
import { toRGB } from '../utilities/colors'
const UNSELECTED_POINT_COLOR = 'rgba(189,189,189,255)'
const SELECTED_POINT_COLOR = 'rgba(70,70,70,255)'
type IdToPoint = Record<string, Vector3<number> | Vector2<number>>
interface Props {
Expand Down Expand Up @@ -95,13 +98,15 @@ onMounted(() => {
}
if (props.selectedPoints.includes(id)) {
// silver for original points that are selected
return `rgba(189,189,189,255)`
// for original points that are selected
return SELECTED_POINT_COLOR
}
if (hideSourcePoints.value) {
return 'rgba(0,0,0,0)'
}
// blue for unselected points
let alpha = hideSourcePoints.value ? 0 : 255
return `rgba(25,118,210,${alpha})`
return UNSELECTED_POINT_COLOR
},
onHover(index: number | null) {
const id = index == null ? '' : indexToId(index)
Expand Down

0 comments on commit 2391c3e

Please sign in to comment.