Bladeren bron

Update tag names

main
Steve Ruiz 4 jaren geleden
bovenliggende
commit
6729435696

+ 1
- 1
state/commands/create-page.ts Bestand weergeven

@@ -11,7 +11,7 @@ export default function createPage(data: Data, goToPage = true) {
11 11
   history.execute(
12 12
     data,
13 13
     new Command({
14
-      name: 'change_page',
14
+      name: 'create_page',
15 15
       category: 'canvas',
16 16
       do(data) {
17 17
         const { page, pageState, currentPageId } = snapshot

+ 2
- 4
state/commands/delete-page.ts Bestand weergeven

@@ -2,18 +2,16 @@ import Command from './command'
2 2
 import history from '../history'
3 3
 import { Data } from 'types'
4 4
 import { current } from 'immer'
5
-import { getPage, getSelectedShapes } from 'utils/utils'
6
-import { getShapeUtils } from 'lib/shape-utils'
7 5
 import vec from 'utils/vec'
8 6
 import storage from 'state/storage'
9 7
 
10
-export default function changePage(data: Data, pageId: string) {
8
+export default function deletePage(data: Data, pageId: string) {
11 9
   const snapshot = getSnapshot(data, pageId)
12 10
 
13 11
   history.execute(
14 12
     data,
15 13
     new Command({
16
-      name: 'change_page',
14
+      name: 'delete_page',
17 15
       category: 'canvas',
18 16
       do(data) {
19 17
         data.currentPageId = snapshot.nextPageId

+ 1
- 1
state/commands/delete-selected.ts Bestand weergeven

@@ -37,7 +37,7 @@ export default function deleteSelected(data: Data) {
37 37
   history.execute(
38 38
     data,
39 39
     new Command({
40
-      name: 'delete_shapes',
40
+      name: 'delete_selection',
41 41
       category: 'canvas',
42 42
       manualSelection: true,
43 43
       do(data) {

+ 1
- 1
state/commands/distribute.ts Bestand weergeven

@@ -34,7 +34,7 @@ export default function distributeCommand(data: Data, type: DistributeType) {
34 34
   history.execute(
35 35
     data,
36 36
     new Command({
37
-      name: 'distributed',
37
+      name: 'distribute_shapes',
38 38
       category: 'canvas',
39 39
       do(data) {
40 40
         const { shapes } = getPage(data, currentPageId)

+ 1
- 0
state/commands/duplicate.ts Bestand weergeven

@@ -19,6 +19,7 @@ export default function duplicateCommand(data: Data) {
19 19
     ...shape,
20 20
     id: uniqueId(),
21 21
     point: vec.add(shape.point, vec.div([16, 16], getCurrentCamera(data).zoom)),
22
+    isGenerated: false,
22 23
   }))
23 24
 
24 25
   history.execute(

+ 3
- 3
state/commands/edit.ts Bestand weergeven

@@ -1,11 +1,11 @@
1 1
 import Command from './command'
2 2
 import history from '../history'
3 3
 import { Data } from 'types'
4
-import { getPage, getShape } from 'utils/utils'
4
+import { getPage } from 'utils/utils'
5 5
 import { EditSnapshot } from 'state/sessions/edit-session'
6 6
 import { getShapeUtils } from 'lib/shape-utils'
7 7
 
8
-export default function handleCommand(
8
+export default function editCommand(
9 9
   data: Data,
10 10
   before: EditSnapshot,
11 11
   after: EditSnapshot
@@ -13,7 +13,7 @@ export default function handleCommand(
13 13
   history.execute(
14 14
     data,
15 15
     new Command({
16
-      name: 'edited_shape',
16
+      name: 'edit_shape',
17 17
       category: 'canvas',
18 18
       do(data) {
19 19
         const { initialShape, currentPageId } = after

+ 1
- 1
state/commands/generate.ts Bestand weergeven

@@ -33,7 +33,7 @@ export default function generateCommand(
33 33
   history.execute(
34 34
     data,
35 35
     new Command({
36
-      name: 'translate_shapes',
36
+      name: 'generate_shapes',
37 37
       category: 'canvas',
38 38
       do(data) {
39 39
         const { shapes } = getPage(data)

+ 0
- 2
state/commands/group.ts Bestand weergeven

@@ -11,8 +11,6 @@ import {
11 11
 } from 'utils/utils'
12 12
 import { current } from 'immer'
13 13
 import { createShape, getShapeUtils } from 'lib/shape-utils'
14
-import { PropsOfType } from 'types'
15
-import { uniqueId } from 'utils/utils'
16 14
 import commands from '.'
17 15
 
18 16
 export default function groupCommand(data: Data) {

+ 2
- 2
state/commands/move-to-page.ts Bestand weergeven

@@ -15,7 +15,7 @@ import { getShapeUtils } from 'lib/shape-utils'
15 15
 import vec from 'utils/vec'
16 16
 import storage from 'state/storage'
17 17
 
18
-export default function nudgeCommand(data: Data, newPageId: string) {
18
+export default function moveToPageCommand(data: Data, newPageId: string) {
19 19
   const { currentPageId: oldPageId } = data
20 20
   const oldPage = getPage(data)
21 21
   const selectedIds = setToArray(getSelectedIds(data))
@@ -35,7 +35,7 @@ export default function nudgeCommand(data: Data, newPageId: string) {
35 35
   history.execute(
36 36
     data,
37 37
     new Command({
38
-      name: 'set_direction',
38
+      name: 'move_to_page',
39 39
       category: 'canvas',
40 40
       manualSelection: true,
41 41
       do(data) {

+ 1
- 1
state/commands/move.ts Bestand weergeven

@@ -24,7 +24,7 @@ export default function moveCommand(data: Data, type: MoveType) {
24 24
   history.execute(
25 25
     data,
26 26
     new Command({
27
-      name: 'move_shapes',
27
+      name: 'change_child_index',
28 28
       category: 'canvas',
29 29
       manualSelection: true,
30 30
       do(data) {

+ 1
- 1
state/commands/nudge.ts Bestand weergeven

@@ -17,7 +17,7 @@ export default function nudgeCommand(data: Data, delta: number[]) {
17 17
   history.execute(
18 18
     data,
19 19
     new Command({
20
-      name: 'set_direction',
20
+      name: 'nudge_shapes',
21 21
       category: 'canvas',
22 22
       do(data) {
23 23
         const { shapes } = getPage(data, currentPageId)

+ 1
- 1
state/commands/paste.ts Bestand weergeven

@@ -44,7 +44,7 @@ export default function pasteCommand(data: Data, initialShapes: Shape[]) {
44 44
   history.execute(
45 45
     data,
46 46
     new Command({
47
-      name: 'pasting_new_shapes',
47
+      name: 'paste_new_shapes',
48 48
       category: 'canvas',
49 49
       manualSelection: true,
50 50
       do(data) {

+ 1
- 1
state/commands/rotate-ccw.ts Bestand weergeven

@@ -60,7 +60,7 @@ export default function rotateCcwCommand(data: Data) {
60 60
   history.execute(
61 61
     data,
62 62
     new Command({
63
-      name: 'translate_shapes',
63
+      name: 'rotate_ccw',
64 64
       category: 'canvas',
65 65
       do(data) {
66 66
         const { shapes } = getPage(data, currentPageId)

+ 1
- 1
state/commands/rotate.ts Bestand weergeven

@@ -13,7 +13,7 @@ export default function rotateCommand(
13 13
   history.execute(
14 14
     data,
15 15
     new Command({
16
-      name: 'translate_shapes',
16
+      name: 'rotate_shapes',
17 17
       category: 'canvas',
18 18
       do(data) {
19 19
         const { shapes } = getPage(data)

+ 8
- 8
state/commands/stretch.ts Bestand weergeven

@@ -1,9 +1,9 @@
1
-import Command from "./command"
2
-import history from "../history"
3
-import { StretchType, Data, Edge, Corner } from "types"
4
-import { getCommonBounds, getPage, getSelectedShapes } from "utils/utils"
5
-import { getShapeUtils } from "lib/shape-utils"
6
-import { current } from "immer"
1
+import Command from './command'
2
+import history from '../history'
3
+import { StretchType, Data, Edge, Corner } from 'types'
4
+import { getCommonBounds, getPage, getSelectedShapes } from 'utils/utils'
5
+import { getShapeUtils } from 'lib/shape-utils'
6
+import { current } from 'immer'
7 7
 
8 8
 export default function stretchCommand(data: Data, type: StretchType) {
9 9
   const { currentPageId } = data
@@ -17,8 +17,8 @@ export default function stretchCommand(data: Data, type: StretchType) {
17 17
   history.execute(
18 18
     data,
19 19
     new Command({
20
-      name: "stretched",
21
-      category: "canvas",
20
+      name: 'stretched_shapes',
21
+      category: 'canvas',
22 22
       do(data) {
23 23
         const { shapes } = getPage(data, currentPageId)
24 24
 

+ 1
- 2
state/commands/style.ts Bestand weergeven

@@ -5,7 +5,6 @@ import {
5 5
   getDocumentBranch,
6 6
   getPage,
7 7
   getSelectedIds,
8
-  getSelectedShapes,
9 8
   setToArray,
10 9
 } from 'utils/utils'
11 10
 import { getShapeUtils } from 'lib/shape-utils'
@@ -25,7 +24,7 @@ export default function styleCommand(data: Data, styles: Partial<ShapeStyles>) {
25 24
   history.execute(
26 25
     data,
27 26
     new Command({
28
-      name: 'changed_style',
27
+      name: 'style_shapes',
29 28
       category: 'canvas',
30 29
       manualSelection: true,
31 30
       do(data) {

+ 1
- 1
state/commands/toggle.ts Bestand weergeven

@@ -19,7 +19,7 @@ export default function toggleCommand(
19 19
   history.execute(
20 20
     data,
21 21
     new Command({
22
-      name: 'toggle_shape_prop',
22
+      name: 'toggle_prop',
23 23
       category: 'canvas',
24 24
       do(data) {
25 25
         const { shapes } = getPage(data, currentPageId)

+ 2
- 8
state/commands/transform-single.ts Bestand weergeven

@@ -1,15 +1,9 @@
1 1
 import Command from './command'
2 2
 import history from '../history'
3
-import { Data, Corner, Edge } from 'types'
4
-import { getShapeUtils } from 'lib/shape-utils'
3
+import { Data } from 'types'
5 4
 import { current } from 'immer'
6 5
 import { TransformSingleSnapshot } from 'state/sessions/transform-single-session'
7
-import {
8
-  getPage,
9
-  getSelectedIds,
10
-  setSelectedIds,
11
-  updateParents,
12
-} from 'utils/utils'
6
+import { getPage, setSelectedIds, updateParents } from 'utils/utils'
13 7
 
14 8
 export default function transformSingleCommand(
15 9
   data: Data,

+ 1
- 2
state/commands/translate.ts Bestand weergeven

@@ -1,7 +1,7 @@
1 1
 import Command from './command'
2 2
 import history from '../history'
3 3
 import { TranslateSnapshot } from 'state/sessions/translate-session'
4
-import { Data, GroupShape, Shape, ShapeType } from 'types'
4
+import { Data, ShapeType } from 'types'
5 5
 import {
6 6
   getDocumentBranch,
7 7
   getPage,
@@ -9,7 +9,6 @@ import {
9 9
   updateParents,
10 10
 } from 'utils/utils'
11 11
 import { getShapeUtils } from 'lib/shape-utils'
12
-import { uniqueId } from 'utils/utils'
13 12
 
14 13
 export default function translateCommand(
15 14
   data: Data,

+ 2
- 5
state/commands/ungroup.ts Bestand weergeven

@@ -1,17 +1,14 @@
1 1
 import Command from './command'
2 2
 import history from '../history'
3
-import { Data, GroupShape, Shape, ShapeType } from 'types'
3
+import { Data, ShapeType } from 'types'
4 4
 import {
5
-  getCommonBounds,
6 5
   getPage,
7 6
   getSelectedShapes,
8 7
   getShape,
9 8
   setSelectedIds,
10 9
 } from 'utils/utils'
11 10
 import { current } from 'immer'
12
-import { createShape, getShapeUtils } from 'lib/shape-utils'
13
-import { PropsOfType } from 'types'
14
-import { uniqueId } from 'utils/utils'
11
+import { getShapeUtils } from 'lib/shape-utils'
15 12
 
16 13
 export default function ungroupCommand(data: Data) {
17 14
   const cData = current(data)

Laden…
Annuleren
Opslaan