Update
This commit is contained in:
@@ -224,11 +224,17 @@ const useVideoExport = ({ timelineElements, dimensions, totalDuration, watermark
|
||||
opacity: WATERMARK_CONFIG.opacity,
|
||||
align: 'center',
|
||||
verticalAlign: 'middle',
|
||||
offsetX: 90, // Approximate half-width to center the text
|
||||
offsetY: 5, // Approximate half-height to center the text
|
||||
});
|
||||
|
||||
layer.add(watermarkText);
|
||||
|
||||
// Force text measurement and update offset for proper centering
|
||||
watermarkText._setTextData();
|
||||
const textWidth = watermarkText.width();
|
||||
const textHeight = watermarkText.height();
|
||||
watermarkText.offsetX(textWidth / 2);
|
||||
watermarkText.offsetY(textHeight / 2);
|
||||
|
||||
layer.draw();
|
||||
|
||||
const dataURL = stage.toDataURL({
|
||||
|
||||
Reference in New Issue
Block a user