[FEAT] Bg select fix
This commit is contained in:
@@ -20,8 +20,8 @@ export interface BackgroundStyles {
|
||||
export function useBackgroundStyles(options: BackgroundStylesOptions) {
|
||||
// Helper to get reactive values
|
||||
const getBackgroundColor = () => (typeof options.backgroundColor === 'string' ? options.backgroundColor : options.backgroundColor.value);
|
||||
const getCheckerboardEnabled = () => (typeof options.checkerboardEnabled === 'boolean' ? options.checkerboardEnabled : options.checkerboardEnabled?.value ?? true);
|
||||
const getDarkMode = () => (typeof options.darkMode === 'boolean' ? options.darkMode : options.darkMode?.value ?? false);
|
||||
const getCheckerboardEnabled = () => (typeof options.checkerboardEnabled === 'boolean' ? options.checkerboardEnabled : (options.checkerboardEnabled?.value ?? true));
|
||||
const getDarkMode = () => (typeof options.darkMode === 'boolean' ? options.darkMode : (options.darkMode?.value ?? false));
|
||||
|
||||
/**
|
||||
* Get the background color.
|
||||
|
||||
@@ -40,10 +40,10 @@ export function useGridMetrics(options: GridMetricsOptions = {}) {
|
||||
// Helper to get reactive values
|
||||
const getLayers = () => (options.layers ? (Array.isArray(options.layers) ? options.layers : options.layers.value) : null);
|
||||
const getSprites = () => (options.sprites ? (Array.isArray(options.sprites) ? options.sprites : options.sprites.value) : []);
|
||||
const getNegativeSpacingEnabled = () => (typeof options.negativeSpacingEnabled === 'boolean' ? options.negativeSpacingEnabled : options.negativeSpacingEnabled?.value ?? false);
|
||||
const getManualCellSizeEnabled = () => (typeof options.manualCellSizeEnabled === 'boolean' ? options.manualCellSizeEnabled : options.manualCellSizeEnabled?.value ?? false);
|
||||
const getManualCellWidth = () => (typeof options.manualCellWidth === 'number' ? options.manualCellWidth : options.manualCellWidth?.value ?? 64);
|
||||
const getManualCellHeight = () => (typeof options.manualCellHeight === 'number' ? options.manualCellHeight : options.manualCellHeight?.value ?? 64);
|
||||
const getNegativeSpacingEnabled = () => (typeof options.negativeSpacingEnabled === 'boolean' ? options.negativeSpacingEnabled : (options.negativeSpacingEnabled?.value ?? false));
|
||||
const getManualCellSizeEnabled = () => (typeof options.manualCellSizeEnabled === 'boolean' ? options.manualCellSizeEnabled : (options.manualCellSizeEnabled?.value ?? false));
|
||||
const getManualCellWidth = () => (typeof options.manualCellWidth === 'number' ? options.manualCellWidth : (options.manualCellWidth?.value ?? 64));
|
||||
const getManualCellHeight = () => (typeof options.manualCellHeight === 'number' ? options.manualCellHeight : (options.manualCellHeight?.value ?? 64));
|
||||
|
||||
/**
|
||||
* Calculate cell dimensions including negative spacing.
|
||||
|
||||
Reference in New Issue
Block a user