File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
packages/vue-flow/src/utils Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,10 @@ function handleParentExpand(updateItem: GraphNode, parent: GraphNode) {
2525 if ( extendWidth > 0 || extendHeight > 0 || updateItem . position . x < 0 || updateItem . position . y < 0 ) {
2626 parent . style = { ...parent . style } || { }
2727
28+ parent . style . width = parent . style . width ?? parent . dimensions . width
29+ parent . style . height = parent . style . height ?? parent . dimensions . height
30+
2831 if ( extendWidth > 0 ) {
29- if ( ! parent . style . width ) {
30- parent . style . width = parent . dimensions . width
31- }
3232 if ( typeof parent . style . width === 'string' ) {
3333 const currWidth = parseInt ( parent . style . width , 10 )
3434 parent . style . width = `${ currWidth + extendWidth } px`
@@ -38,9 +38,6 @@ function handleParentExpand(updateItem: GraphNode, parent: GraphNode) {
3838 }
3939
4040 if ( extendHeight > 0 ) {
41- if ( ! parent . style . height ) {
42- parent . style . height = parent . dimensions . height
43- }
4441 if ( typeof parent . style . height === 'string' ) {
4542 const currWidth = parseInt ( parent . style . height , 10 )
4643 parent . style . height = `${ currWidth + extendHeight } px`
You can’t perform that action at this time.
0 commit comments