Big restructure of utils
This commit is contained in:
parent
80d2ba5f00
commit
45223e2a8d
69 changed files with 1334 additions and 1031 deletions
|
@ -2,8 +2,8 @@ import Command from './command'
|
|||
import history from '../history'
|
||||
import { Data } from 'types'
|
||||
import { RotateSnapshot } from 'state/sessions/rotate-session'
|
||||
import { getPage } from 'utils'
|
||||
import { getShapeUtils } from 'state/shape-utils'
|
||||
import tld from 'utils/tld'
|
||||
|
||||
export default function rotateCommand(
|
||||
data: Data,
|
||||
|
@ -16,7 +16,7 @@ export default function rotateCommand(
|
|||
name: 'rotate_shapes',
|
||||
category: 'canvas',
|
||||
do(data) {
|
||||
const { shapes } = getPage(data)
|
||||
const { shapes } = tld.getPage(data)
|
||||
|
||||
for (const { id, point, rotation } of after.initialShapes) {
|
||||
const shape = shapes[id]
|
||||
|
@ -29,7 +29,7 @@ export default function rotateCommand(
|
|||
data.boundsRotation = after.boundsRotation
|
||||
},
|
||||
undo(data) {
|
||||
const { shapes } = getPage(data)
|
||||
const { shapes } = tld.getPage(data)
|
||||
|
||||
for (const { id, point, rotation } of before.initialShapes) {
|
||||
const shape = shapes[id]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue