resolved some requested changes

This commit is contained in:
peterkogo
2024-04-10 14:47:49 +02:00
parent db05c3f3f4
commit 835dec25ba
13 changed files with 39 additions and 43 deletions
@@ -35,8 +35,8 @@
export let sourcePosition: $$Props['sourcePosition'] = undefined;
export let targetPosition: $$Props['targetPosition'] = undefined;
export let zIndex: $$Props['zIndex'];
export let computedWidth: $$Props['computedWidth'] = undefined;
export let computedHeight: $$Props['computedHeight'] = undefined;
export let measuredWidth: $$Props['measuredWidth'] = undefined;
export let measuredHeight: $$Props['measuredHeight'] = undefined;
export let initialWidth: $$Props['initialWidth'] = undefined;
export let initialHeight: $$Props['initialHeight'] = undefined;
export let width: $$Props['width'] = undefined;
@@ -79,8 +79,8 @@
height,
initialWidth,
initialHeight,
computedWidth,
computedHeight
measuredWidth,
measuredHeight
});
$: {
@@ -21,8 +21,8 @@ export type NodeWrapperProps = Pick<
| 'initialWidth'
| 'initialHeight'
> & {
computedWidth?: number;
computedHeight?: number;
measuredWidth?: number;
measuredHeight?: number;
type: string;
positionX: number;
positionY: number;
@@ -3,20 +3,20 @@ export function getNodeInlineStyleDimensions({
height,
initialWidth,
initialHeight,
computedWidth,
computedHeight
measuredWidth,
measuredHeight
}: {
width?: number;
height?: number;
initialWidth?: number;
initialHeight?: number;
computedWidth?: number;
computedHeight?: number;
measuredWidth?: number;
measuredHeight?: number;
}): {
width: string | undefined;
height: string | undefined;
} {
if (computedWidth === undefined && computedHeight === undefined) {
if (measuredWidth === undefined && measuredHeight === undefined) {
const styleWidth = width ?? initialWidth;
const styleHeight = height ?? initialHeight;