feat(canvas): update pen tool cursor and add PNG asset

This commit is contained in:
2026-07-17 11:58:52 +08:00
parent d424b56076
commit 7e9f8194d9
3 changed files with 8 additions and 6 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 977 B

+5 -5
View File
@@ -1616,13 +1616,13 @@ button:disabled {
} }
.canvas-stage.is-path-pen-tool, .canvas-stage.is-path-pen-tool,
.canvas-stage.is-path-pen-tool .leafer-canvas-layer,
.canvas-stage.is-path-pen-tool .leafer-canvas-layer > canvas,
.canvas-stage.is-path-pen-tool .canvas-world, .canvas-stage.is-path-pen-tool .canvas-world,
.canvas-stage.is-path-pen-tool .canvas-node, .canvas-stage.is-path-pen-tool .canvas-world *,
.canvas-stage.is-path-pen-tool .artboard-image,
.canvas-stage.is-path-pen-tool .artboard-preview,
.canvas-stage.is-path-pen-tool .canvas-path-editor-overlay, .canvas-stage.is-path-pen-tool .canvas-path-editor-overlay,
.canvas-stage.is-path-pen-tool .canvas-path-editor-overlay > canvas { .canvas-stage.is-path-pen-tool .canvas-path-editor-overlay * {
cursor: url("/cursors/pen-tool.svg?v=3") 4 4, default !important; cursor: url("/cursors/pen-tool.png?v=4") 4 4, default !important;
} }
.canvas-stage.is-text-tool, .canvas-stage.is-text-tool,
+3 -1
View File
@@ -97,5 +97,7 @@ test("keeps the Pen tool immediately after Shape in the workspace toolbar", asyn
assert.doesNotMatch(workspaceSource, /startPenDrawing\(event, true\)/); assert.doesNotMatch(workspaceSource, /startPenDrawing\(event, true\)/);
assert.match(workspaceSource, /key === "p"\) return void run\(\(\) => chooseCanvasTool\("path"\)\)/); assert.match(workspaceSource, /key === "p"\) return void run\(\(\) => chooseCanvasTool\("path"\)\)/);
assert.match(workspaceSource, /key === "b"\) return void run\(\(\) => chooseCanvasTool\("pen"\)\)/); assert.match(workspaceSource, /key === "b"\) return void run\(\(\) => chooseCanvasTool\("pen"\)\)/);
assert.match(styles, /cursor:\s*url\("\/cursors\/pen-tool\.svg\?v=3"\) 4 4, default !important;/); assert.match(styles, /\.canvas-stage\.is-path-pen-tool \.canvas-world \*/);
assert.match(styles, /\.canvas-stage\.is-path-pen-tool \.canvas-path-editor-overlay \*/);
assert.match(styles, /cursor:\s*url\("\/cursors\/pen-tool\.png\?v=4"\) 4 4, default !important;/);
}); });