Add custom SVG cursors and update cursor handling
- Introduced new SVG cursor assets: cross, default, export, move, open, pen, and pointing.
- Implemented SCSS styles for cursor usage in the scene container, defining specific cursors for different modes (draw, pointer, pen, measure, hand).
- Enhanced cursor functionality by adding a utility function to handle canvas cursor changes based on user actions, mapping specific actions to corresponding cursor styles.
2025-07-11 09:26:21 +05:30
|
|
|
$cursor-default: url("../../assets/cursors/default.svg") 0 0, default;
|
|
|
|
|
$cursor-pen: url("../../assets/cursors/pen.svg") 0 0, default;
|
|
|
|
|
$cursor-delete: url("../../assets/cursors/pointing.svg") 4 0, default;
|
2025-07-11 18:18:27 +05:30
|
|
|
$cursor-comment: url("../../assets/cursors/comment.svg") 0 16, default;
|
Add custom SVG cursors and update cursor handling
- Introduced new SVG cursor assets: cross, default, export, move, open, pen, and pointing.
- Implemented SCSS styles for cursor usage in the scene container, defining specific cursors for different modes (draw, pointer, pen, measure, hand).
- Enhanced cursor functionality by adding a utility function to handle canvas cursor changes based on user actions, mapping specific actions to corresponding cursor styles.
2025-07-11 09:26:21 +05:30
|
|
|
$cursor-draw: url("../../assets/cursors/cell.svg") 8 8, default;
|
|
|
|
|
$cursor-cross: url("../../assets/cursors/cross.svg") 8 8, default;
|
|
|
|
|
$cursor-grab: url("../../assets/cursors/open.svg") 8 8, default;
|
|
|
|
|
$cursor-grabing: url("../../assets/cursors/close.svg") 8 8, default;
|
|
|
|
|
|
|
|
|
|
.scene-container {
|
|
|
|
|
canvas {
|
|
|
|
|
cursor: $cursor-default !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.scene-container.draw {
|
|
|
|
|
canvas {
|
|
|
|
|
cursor: $cursor-draw !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.scene-container.pointer {
|
|
|
|
|
canvas {
|
|
|
|
|
cursor: $cursor-delete !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.scene-container.pen {
|
|
|
|
|
canvas {
|
|
|
|
|
cursor: $cursor-pen !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.scene-container.measure {
|
|
|
|
|
canvas {
|
|
|
|
|
cursor: $cursor-cross !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.scene-container.hand {
|
|
|
|
|
canvas {
|
|
|
|
|
cursor: $cursor-grab !important;
|
|
|
|
|
&:active{
|
|
|
|
|
cursor: $cursor-grabing !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-07-11 12:31:00 +05:30
|
|
|
.scene-container.hand-closed {
|
|
|
|
|
canvas {
|
|
|
|
|
cursor: $cursor-grabing !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-07-11 18:18:27 +05:30
|
|
|
.scene-container.comment {
|
|
|
|
|
canvas {
|
|
|
|
|
cursor: $cursor-comment !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|