refactor(nodes): only re render changed nodes

This commit is contained in:
moklick
2019-07-31 17:24:23 +02:00
parent 6e71591cb8
commit 3403203adb
9 changed files with 3950 additions and 3871 deletions
+10 -10
View File
@@ -27,7 +27,7 @@ let internalNodeId = 0;
const getId = () => internalNodeId++;
export const parseElements = e => {
export const parseElements = (e) => {
e.type = e.type || 'default';
e.id = e.id ? e.id : getId();
@@ -35,15 +35,15 @@ export const parseElements = e => {
return e;
}
return {
...e,
id: e.id.toString(),
__rg: {
position: e.position,
width: null,
height: null
}
}
e.id = e.id.toString();
e.__rg = {
position: e.position,
width: null,
height: null,
handleBounds : {}
};
return { ...e };
};
export const separateElements = (res, element) => {