Update
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
// video-preview-utils.js
|
||||
|
||||
// Import centralized font management
|
||||
import { getFontStyle } from '@/modules/editor/fonts';
|
||||
|
||||
// Snap settings
|
||||
export const POSITION_SNAP_THRESHOLD = 10; // Pixels within which to snap to center
|
||||
|
||||
@@ -16,21 +19,8 @@ export const getImageSource = (element, videoStates, isPlaying) => {
|
||||
return null;
|
||||
};
|
||||
|
||||
// Helper function to get font style for text elements
|
||||
export const getTextFontStyle = (element) => {
|
||||
const isBold = element.fontWeight === 'bold' || element.fontWeight === 700;
|
||||
const isItalic = element.fontStyle === 'italic';
|
||||
|
||||
if (isBold && isItalic) {
|
||||
return 'bold italic';
|
||||
} else if (isBold) {
|
||||
return 'bold';
|
||||
} else if (isItalic) {
|
||||
return 'italic';
|
||||
} else {
|
||||
return 'normal';
|
||||
}
|
||||
};
|
||||
// Re-export the centralized font style function for backward compatibility
|
||||
export { getFontStyle as getTextFontStyle };
|
||||
|
||||
// Check if element uses center-offset positioning
|
||||
export const usesCenterPositioning = (elementType) => {
|
||||
|
||||
Reference in New Issue
Block a user