Skip to content

Commit abdfcfd

Browse files
authored
feat(view-hierarchy): Change the default cursor to pointer (#44776)
The grab cursor wasn't indicating to the user that they can make selections in the wireframe. The pointer is a better primary cue and we can keep the grabbing cursor once the user does that action. Closes #44747
1 parent 215a13e commit abdfcfd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

static/app/components/events/viewHierarchy/wireframe.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,11 @@ function Wireframe({hierarchy, selectedNode, onNodeSelect, project}: WireframePr
181181

182182
const handleMouseDown = (e: MouseEvent) => {
183183
start = vec2.fromValues(e.offsetX, e.offsetY);
184-
overlayRef.style.cursor = 'grabbing';
185184
};
186185

187186
const handleMouseMove = (e: MouseEvent) => {
188187
if (start) {
188+
overlayRef.style.cursor = 'grabbing';
189189
isDragging = true;
190190
hoveredRect = null;
191191
const currPosition = vec2.fromValues(e.offsetX, e.offsetY);
@@ -219,7 +219,7 @@ function Wireframe({hierarchy, selectedNode, onNodeSelect, project}: WireframePr
219219
mat3.copy(transformationMatrix, currTransformationMatrix);
220220
}
221221
start = null;
222-
overlayRef.style.cursor = 'grab';
222+
overlayRef.style.cursor = 'pointer';
223223
};
224224

225225
const handleMouseClick = (e: MouseEvent) => {
@@ -351,6 +351,7 @@ const InteractionContainer = styled('div')`
351351
left: 0;
352352
height: 100%;
353353
width: 100%;
354+
cursor: pointer;
354355
`;
355356

356357
const Controls = styled('div')`
@@ -369,7 +370,6 @@ const InteractionOverlayCanvas = styled('canvas')`
369370

370371
const WireframeCanvas = styled('canvas')`
371372
background-color: ${p => p.theme.surface100};
372-
cursor: grab;
373373
width: 100%;
374374
height: 100%;
375375
`;

0 commit comments

Comments
 (0)