@vvfx/sdk 0.2.9 → 0.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/html-overlay/auto-height-layout.d.ts +6 -0
- package/dist/html-overlay/auto-height-layout.js +7 -0
- package/dist/html-overlay/manager.d.ts +1 -0
- package/dist/html-overlay/manager.js +15 -1
- package/dist/index.cjs +34 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +34 -8
- package/dist/index.mjs.map +1 -1
- package/dist/sdk.js +8 -3
- package/package.json +1 -1
package/dist/sdk.js
CHANGED
|
@@ -16,6 +16,7 @@ import { Vector2, Vector3 } from './math';
|
|
|
16
16
|
import { UndoRedo } from './service/UndoRedo';
|
|
17
17
|
import { isCardItem, isEffectsItem, isFrameItem } from './sdk-item';
|
|
18
18
|
import { HTMLOverlayManager } from './html-overlay';
|
|
19
|
+
import { resolveTopAnchoredCardPosition } from './html-overlay/auto-height-layout';
|
|
19
20
|
import { orderSDKCanvasLayers } from './layer-order';
|
|
20
21
|
const HTML_CARD_EDITING_VIEWPORT_PADDING = 48;
|
|
21
22
|
export class SDK {
|
|
@@ -124,14 +125,18 @@ export class SDK {
|
|
|
124
125
|
});
|
|
125
126
|
return;
|
|
126
127
|
}
|
|
127
|
-
const
|
|
128
|
-
|
|
128
|
+
const position = resolveTopAnchoredCardPosition({
|
|
129
|
+
nextHeight: height,
|
|
130
|
+
position: item.property.position,
|
|
131
|
+
previousHeight: options.previousHeight,
|
|
132
|
+
scaleY: item.property.scale?.[1] ?? 1,
|
|
133
|
+
});
|
|
129
134
|
void this.setItemProperty({
|
|
130
135
|
itemId: id,
|
|
131
136
|
type: SDKItemType.CARD,
|
|
132
137
|
property: {
|
|
133
138
|
height,
|
|
134
|
-
position
|
|
139
|
+
position,
|
|
135
140
|
},
|
|
136
141
|
});
|
|
137
142
|
},
|