refactor(nodes): wrap with memo, update transform without creatin new array #282

This commit is contained in:
moklick
2020-06-05 12:55:11 +02:00
parent d5997ecbea
commit 6b8e7bfbc3
5 changed files with 22 additions and 28 deletions
+3 -1
View File
@@ -330,7 +330,9 @@ export const storeModel: StoreModel = {
}),
updateTransform: action((state, transform) => {
state.transform = [transform.x, transform.y, transform.k];
state.transform[0] = transform.x;
state.transform[1] = transform.y;
state.transform[2] = transform.k;
}),
updateSize: action((state, size) => {