@gedit/editor-2d 0.3.13 → 0.3.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/editor2d-contribution.d.ts.map +1 -1
- package/lib/browser/editor2d-contribution.js +19 -18
- package/lib/browser/editor2d-contribution.js.map +1 -1
- package/lib/browser/playground/canvas-layer.d.ts +2 -1
- package/lib/browser/playground/canvas-layer.d.ts.map +1 -1
- package/lib/browser/playground/canvas-layer.js +8 -1
- package/lib/browser/playground/canvas-layer.js.map +1 -1
- package/lib/browser/playground/path-edit/path-edit-layer-move-point.d.ts.map +1 -1
- package/lib/browser/playground/path-edit/path-edit-layer-move-point.js +29 -3
- package/lib/browser/playground/path-edit/path-edit-layer-move-point.js.map +1 -1
- package/lib/browser/playground/path-edit/path-edit-layer-svg-path.d.ts +9 -2
- package/lib/browser/playground/path-edit/path-edit-layer-svg-path.d.ts.map +1 -1
- package/lib/browser/playground/path-edit/path-edit-layer-svg-path.js +232 -13
- package/lib/browser/playground/path-edit/path-edit-layer-svg-path.js.map +1 -1
- package/lib/browser/playground/path-edit/utils.d.ts +15 -3
- package/lib/browser/playground/path-edit/utils.d.ts.map +1 -1
- package/lib/browser/playground/path-edit/utils.js +63 -13
- package/lib/browser/playground/path-edit/utils.js.map +1 -1
- package/lib/browser/playground/path-edit-layer.d.ts +46 -3
- package/lib/browser/playground/path-edit-layer.d.ts.map +1 -1
- package/lib/browser/playground/path-edit-layer.js +469 -110
- package/lib/browser/playground/path-edit-layer.js.map +1 -1
- package/lib/browser/playground/playground-contribution.d.ts.map +1 -1
- package/lib/browser/playground/playground-contribution.js +2 -0
- package/lib/browser/playground/playground-contribution.js.map +1 -1
- package/lib/browser/utils/bezier.path.utils.d.ts.map +1 -1
- package/lib/browser/utils/bezier.path.utils.js +3 -0
- package/lib/browser/utils/bezier.path.utils.js.map +1 -1
- package/package.json +7 -7
- package/src/browser/editor2d-contribution.ts +19 -18
- package/src/browser/playground/canvas-layer.ts +6 -1
- package/src/browser/playground/path-edit/path-edit-layer-move-point.tsx +38 -4
- package/src/browser/playground/path-edit/path-edit-layer-svg-path.tsx +303 -26
- package/src/browser/playground/path-edit/utils.tsx +80 -17
- package/src/browser/playground/path-edit-layer.tsx +526 -122
- package/src/browser/playground/playground-contribution.ts +2 -0
- package/src/browser/style/path-edit-layer.less +17 -5
- package/src/browser/svg/drag_path.svg +17 -0
- package/src/browser/utils/bezier.path.utils.ts +3 -0
|
@@ -65,6 +65,8 @@ export class PlaygroundContribution2d implements PlaygroundContribution {
|
|
|
65
65
|
icon: 'gedit-toolbar-full',
|
|
66
66
|
title: '全屏',
|
|
67
67
|
priority: 6,
|
|
68
|
+
ctr: true,
|
|
69
|
+
shortcut: 'F',
|
|
68
70
|
cancelMode: 'once',
|
|
69
71
|
handle: () => {
|
|
70
72
|
this.commandService.executeCommand(CommonCommands.TOGGLE_MAXIMIZED.id);
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
.gedit-path-edit-layer,
|
|
1
|
+
.gedit-path-edit-layer,
|
|
2
|
+
.gedit-anim-path-edit-layer {
|
|
2
3
|
position: absolute;
|
|
3
4
|
left: 0;
|
|
4
5
|
top: 0;
|
|
5
6
|
overflow: visible;
|
|
6
7
|
z-index: 51;
|
|
8
|
+
|
|
7
9
|
&-point {
|
|
8
10
|
stroke: #ccc;
|
|
9
11
|
fill: #fff;
|
|
10
12
|
cursor: pointer;
|
|
11
13
|
z-index: 50;
|
|
12
|
-
transition: stroke 0.2s ease-in-out, fill 0.2s ease-in-out,
|
|
14
|
+
transition: stroke 0.2s ease-in-out, fill 0.2s ease-in-out,
|
|
15
|
+
stroke-width 0.2s ease-in-out;
|
|
13
16
|
&-move {
|
|
14
17
|
z-index: 0;
|
|
15
18
|
}
|
|
@@ -30,11 +33,20 @@
|
|
|
30
33
|
}
|
|
31
34
|
&-point-active {
|
|
32
35
|
stroke: #fff;
|
|
33
|
-
fill: var(--g-playground-select)
|
|
36
|
+
fill: var(--g-playground-select);
|
|
37
|
+
}
|
|
38
|
+
&-hover-point {
|
|
39
|
+
stroke: #ccc;
|
|
40
|
+
fill: var(--g-playground-select);
|
|
41
|
+
pointer-events: none;
|
|
34
42
|
}
|
|
43
|
+
|
|
35
44
|
&-pen {
|
|
36
45
|
cursor: url(../svg/pen_add.svg), copy;
|
|
37
46
|
}
|
|
47
|
+
&-drag {
|
|
48
|
+
cursor: url(../svg/drag_path.svg), move;
|
|
49
|
+
}
|
|
38
50
|
&-line {
|
|
39
51
|
stroke: #ccc;
|
|
40
52
|
fill: none;
|
|
@@ -52,7 +64,7 @@
|
|
|
52
64
|
fill: none;
|
|
53
65
|
// stroke-width: 1px;
|
|
54
66
|
pointer-events: auto;
|
|
55
|
-
&:hover {
|
|
67
|
+
&:hover, &-active {
|
|
56
68
|
stroke: var(--g-playground-select);
|
|
57
69
|
}
|
|
58
70
|
}
|
|
@@ -64,4 +76,4 @@
|
|
|
64
76
|
stroke: #fff000;
|
|
65
77
|
}
|
|
66
78
|
}
|
|
67
|
-
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="20px" height="21px" viewBox="0 0 20 21" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>编组 2</title>
|
|
4
|
+
<defs>
|
|
5
|
+
<rect id="path-1" x="0" y="0" width="20" height="20"></rect>
|
|
6
|
+
</defs>
|
|
7
|
+
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
8
|
+
<g id="编组-2" transform="translate(0, 0.398)">
|
|
9
|
+
<mask id="mask-2" fill="white">
|
|
10
|
+
<use xlink:href="#path-1"></use>
|
|
11
|
+
</mask>
|
|
12
|
+
<g id="path-1"></g>
|
|
13
|
+
<path d="M-0.830692132,2.17785974 L14.8171995,7.68065681 L6.87879222,9.44171576 L4.37587085,16.5078052 L-0.830692132,2.17785974 Z" id="矩形" stroke="#FFFFFF" fill="#000000" stroke-linejoin="round" mask="url(#mask-2)" transform="translate(6.5, 9.0136) rotate(13) translate(-6.5, -9.0136)"></path>
|
|
14
|
+
<path d="M12.4735107,11.9940484 C14.879172,11.9940484 16.7376262,13.3503417 17.9545712,15.9052046 C18.1920716,16.4038146 17.9804004,17.0005501 17.4817904,17.2380505 C16.9831803,17.4755509 16.3864449,17.2638798 16.1489444,16.7652697 C15.2439005,14.8652142 14.0501899,13.9940484 12.4735107,13.9940484 C10.9136368,13.9940484 9.79991519,14.8441472 9.01942502,16.7194762 C8.80721562,17.2293641 8.22184014,17.4706802 7.7119523,17.2584708 C7.20206445,17.0462614 6.96074839,16.4608859 7.17295779,15.950998 C8.24655291,13.3714087 10.0510442,11.9940484 12.4735107,11.9940484 Z" id="路径-2" stroke="#FFFFFF" fill="#000000" fill-rule="nonzero" mask="url(#mask-2)"></path>
|
|
15
|
+
</g>
|
|
16
|
+
</g>
|
|
17
|
+
</svg>
|