diff --git a/vue-components/src/components/ScatterPlot.vue b/vue-components/src/components/ScatterPlot.vue index 0e73f70..9bc7fb6 100644 --- a/vue-components/src/components/ScatterPlot.vue +++ b/vue-components/src/components/ScatterPlot.vue @@ -8,6 +8,7 @@ import type { ColorMap } from '@colormap/core' import type { Vector3, Vector2 } from '../types' import { toRGB } from '../utilities/colors' +import { makeStyles } from 'scatter-gl/dist/styles' const UNSELECTED_POINT_COLOR = 'rgba(189,189,189,255)' const SELECTED_POINT_COLOR = 'rgba(70,70,70,255)' @@ -125,6 +126,9 @@ onMounted(() => { scatterPlot = new ScatterGL(plotContainer.value, { rotateOnStart: false, selectEnabled: true, + styles: { + axesVisible: true + }, pointColorer(i) { const id = indexToId(i) const isTrans = isTransformed(i) @@ -165,6 +169,8 @@ onMounted(() => { } }) scatterPlotRef.value = scatterPlot + // @ts-expect-error: force axes in 2D mode + scatterPlot.scatterPlot.add3dAxes() const cameraControls = ((scatterPlot as any).scatterPlot as any).orbitCameraControls cameraControls.addEventListener('start', emitCameraPosition)