refactor(react): add setAttributes for dimension changes
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
# @xyflow/react
|
||||
|
||||
## 12.0.0-next.xx
|
||||
## 12.0.0-next.15
|
||||
|
||||
## Patch changes
|
||||
|
||||
- re-observe nodes when using `onlyRenderVisibleElements={true}`
|
||||
- use correct positions for intersection helpers
|
||||
- fix minimap interaction for touch devices
|
||||
- pass user nodes to `onSelectionChange` instead of internal ones
|
||||
- pass user nodes to `onSelectionChange` instead of internal ones to work with Redux
|
||||
- call `onEnd` in XYResizer thanks @tonyf
|
||||
- cleanup `getPositionWithOrigin` usage
|
||||
- use `setAttributes` flag for dimension change when `width`/`height` should be set
|
||||
|
||||
## 12.0.0-next.14
|
||||
|
||||
|
||||
@@ -113,6 +113,7 @@ function ResizeControl({
|
||||
id,
|
||||
type: 'dimensions',
|
||||
resizing: true,
|
||||
setAttributes: true,
|
||||
dimensions: {
|
||||
width: change.width,
|
||||
height: change.height,
|
||||
|
||||
@@ -100,7 +100,7 @@ function applyChange(change: any, element: any): any {
|
||||
element.measured.width = change.dimensions.width;
|
||||
element.measured.height = change.dimensions.height;
|
||||
|
||||
if (change.resizing) {
|
||||
if (change.setAttributes) {
|
||||
element.width = change.dimensions.width;
|
||||
element.height = change.dimensions.height;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user