@versa_ai/vmml-editor 1.0.25 → 1.0.26
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/.turbo/turbo-build.log +9 -9
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/index.tsx +6 -3
package/package.json
CHANGED
package/src/index.tsx
CHANGED
|
@@ -426,21 +426,24 @@ const EditorFn = <Schema extends AnyZodObject, Props>(
|
|
|
426
426
|
}
|
|
427
427
|
}, [dragState]);
|
|
428
428
|
|
|
429
|
-
const updateVmml = (v: any) => {
|
|
429
|
+
const updateVmml = (v: any, checkFrame: number) => {
|
|
430
430
|
const { current: playerCurrent }: any = vmmlPlayerRef;
|
|
431
431
|
const { current: canvasCurrent }: any = canvasRef;
|
|
432
432
|
if (!playerCurrent) return;
|
|
433
433
|
canvasCurrent?.getCanvasCtx()?.clear?.()
|
|
434
434
|
|
|
435
|
+
const currentFrame = checkFrame ?? pauseFrame
|
|
436
|
+
|
|
435
437
|
const convertedVmml = convertVmmlTextScaleByForbidden(v);
|
|
436
438
|
setVmmlState(convertedVmml);
|
|
437
439
|
setDurationInFrames(getFrames(v?.template?.duration || 1, fps));
|
|
438
|
-
|
|
440
|
+
|
|
441
|
+
playerCurrent.setVmml(convertedVmml, currentFrame);
|
|
439
442
|
|
|
440
443
|
setRefreshEdit(Date.now());
|
|
441
444
|
|
|
442
445
|
if (canvasCurrent) {
|
|
443
|
-
canvasCurrent.checkObjectInPoint(
|
|
446
|
+
canvasCurrent.checkObjectInPoint(currentFrame);
|
|
444
447
|
}
|
|
445
448
|
}
|
|
446
449
|
|