File tree Expand file tree Collapse file tree 4 files changed +12
-5
lines changed Expand file tree Collapse file tree 4 files changed +12
-5
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @vue-flow/core " : patch
3
+ ---
4
+
5
+ Prevent overwriting width/height in node styles object with ` node.width ` /` node.height ` if ` width ` /` height ` already exist in the styles object.
6
+ Fixes NodeResizer not working when initial size was passed to a node through ` node.width ` /` node.height ` .
Original file line number Diff line number Diff line change 6
6
"author" :
" Burak Cakmakoglu<[email protected] >" ,
7
7
"repository" : {
8
8
"type" : " git" ,
9
- "url" : " git+https://github.com/bcakmakoglu/vue-flow"
9
+ "url" : " git+https://github.com/bcakmakoglu/vue-flow" ,
10
+ "directory" : " packages/core"
10
11
},
11
- "homepage" : " https://github.com/bcakmakoglu/vue-flow#readme " ,
12
+ "homepage" : " https://vueflow.dev " ,
12
13
"bugs" : {
13
14
"url" : " https://github.com/bcakmakoglu/vue-flow/issues"
14
15
},
Original file line number Diff line number Diff line change @@ -142,11 +142,11 @@ const NodeWrapper = defineComponent({
142
142
const width = node . width instanceof Function ? node . width ( node ) : node . width
143
143
const height = node . height instanceof Function ? node . height ( node ) : node . height
144
144
145
- if ( width ) {
145
+ if ( ! styles . width && width ) {
146
146
styles . width = typeof width === 'string' ? width : `${ width } px`
147
147
}
148
148
149
- if ( height ) {
149
+ if ( ! styles . height && height ) {
150
150
styles . height = typeof height === 'string' ? height : `${ height } px`
151
151
}
152
152
Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ export function applyChanges<
166
166
element . dimensions = currentChange . dimensions
167
167
}
168
168
169
- if ( typeof currentChange . updateStyle !== 'undefined' ) {
169
+ if ( typeof currentChange . updateStyle !== 'undefined' && currentChange . updateStyle ) {
170
170
element . style = {
171
171
...( element . style || { } ) ,
172
172
width : `${ currentChange . dimensions ?. width } px` ,
You can’t perform that action at this time.
0 commit comments