Skip to content

Commit

Permalink
fix(cursor actuator): changed cursor to better convey interaction whe…
Browse files Browse the repository at this point in the history
…n dragging actuators
  • Loading branch information
bfrucha committed Feb 18, 2021
1 parent 2912572 commit d39be51
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/actuatorsPlacement/actuatorsPlacement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ const useStyles = makeStyles((theme: Theme) => ({
cursor: "all-scroll"
},
controlActuatorsCursor: {
cursor: "pointer"
cursor: "grab"
},
grabActuator: {
cursor: "grabbing"
},
instructions: {
position: 'fixed',
Expand Down Expand Up @@ -232,7 +235,7 @@ export default function ActuatorPlacement() {
</Button>
<Canvas
camera={{ fov: 45, aspect: 1, near: 0.1, far: 100, position: [0, 2.5, 2.5]}}
className={clsx(classes.canvas, controlCamera ? classes.controlCamCursor : classes.controlActuatorsCursor)}
className={clsx(classes.canvas, controlCamera ? classes.controlCamCursor : (selectedActuator >= 0 ? classes.grabActuator : classes.controlActuatorsCursor))}
id="canvas3D"
// onPointerUp={() => { setSelectedActuator(-1); console.log(actuatorPositions); }}>
onPointerUp={() => setSelectedActuator(-1)}
Expand Down

0 comments on commit d39be51

Please sign in to comment.