refactor(node): pass width and height dep to style memo
This commit is contained in:
@@ -90,6 +90,8 @@ export default (NodeComponent: ComponentType<NodeComponentProps>) => {
|
||||
onMouseMove,
|
||||
onMouseLeave,
|
||||
isParentNode,
|
||||
width,
|
||||
height,
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
@@ -293,10 +293,6 @@ function applyChanges(changes: NodeChange[] | EdgeChange[], elements: any[]): an
|
||||
const initElements: any[] = [];
|
||||
|
||||
return elements.reduce((res: any[], item: any) => {
|
||||
if (item.childNodes) {
|
||||
item.childNodes = applyChanges(changes, item.childNodes);
|
||||
}
|
||||
|
||||
const currentChange = changes.find((c) => c.id === item.id);
|
||||
|
||||
if (currentChange) {
|
||||
|
||||
Reference in New Issue
Block a user