|
|
@@ -66,19 +66,6 @@ export default class TransformSession extends BaseSession {
|
|
66
|
66
|
|
|
67
|
67
|
const shape = shapes[id]
|
|
68
|
68
|
|
|
69
|
|
- // const transformOrigins = {
|
|
70
|
|
- // [Edge.Top]: [0.5, 1],
|
|
71
|
|
- // [Edge.Right]: [0, 0.5],
|
|
72
|
|
- // [Edge.Bottom]: [0.5, 0],
|
|
73
|
|
- // [Edge.Left]: [1, 0.5],
|
|
74
|
|
- // [Corner.TopLeft]: [1, 1],
|
|
75
|
|
- // [Corner.TopRight]: [0, 1],
|
|
76
|
|
- // [Corner.BottomLeft]: [1, 0],
|
|
77
|
|
- // [Corner.BottomRight]: [0, 0],
|
|
78
|
|
- // }
|
|
79
|
|
-
|
|
80
|
|
- // const origin = transformOrigins[this.transformType]
|
|
81
|
|
-
|
|
82
|
69
|
getShapeUtils(shape).transform(shape, newShapeBounds, {
|
|
83
|
70
|
type: this.transformType,
|
|
84
|
71
|
initialShape,
|
|
|
@@ -177,3 +164,16 @@ export function getTransformSnapshot(
|
|
177
|
164
|
}
|
|
178
|
165
|
|
|
179
|
166
|
export type TransformSnapshot = ReturnType<typeof getTransformSnapshot>
|
|
|
167
|
+
|
|
|
168
|
+// const transformOrigins = {
|
|
|
169
|
+// [Edge.Top]: [0.5, 1],
|
|
|
170
|
+// [Edge.Right]: [0, 0.5],
|
|
|
171
|
+// [Edge.Bottom]: [0.5, 0],
|
|
|
172
|
+// [Edge.Left]: [1, 0.5],
|
|
|
173
|
+// [Corner.TopLeft]: [1, 1],
|
|
|
174
|
+// [Corner.TopRight]: [0, 1],
|
|
|
175
|
+// [Corner.BottomLeft]: [1, 0],
|
|
|
176
|
+// [Corner.BottomRight]: [0, 0],
|
|
|
177
|
+// }
|
|
|
178
|
+
|
|
|
179
|
+// const origin = transformOrigins[this.transformType]
|