feat: add layer font size
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { createStore } from 'solid-js/store';
|
||||
import { calculateDimensions } from './dimensions';
|
||||
import { loadCSV } from '../../utils/csv-loader';
|
||||
import { initLayerConfigs } from './layer-parser';
|
||||
import { initLayerConfigs, formatLayers } from './layer-parser';
|
||||
import type { CardData, LayerConfig, Dimensions } from '../types';
|
||||
|
||||
/**
|
||||
@@ -277,10 +277,7 @@ export function createDeckStore(
|
||||
const clearError = () => setState({ error: null });
|
||||
|
||||
const generateCode = () => {
|
||||
const layersStr = state.layerConfigs
|
||||
.filter(l => l.visible)
|
||||
.map(l => `${l.prop}:${l.x1},${l.y1}-${l.x2},${l.y2}${l.orientation && l.orientation !== 'n' ? `${l.orientation}` : ''}`)
|
||||
.join(' ');
|
||||
const layersStr = formatLayers(state.layerConfigs);
|
||||
return `:md-deck[${state.rawSrc || state.src}]{size="${state.sizeW}x${state.sizeH}" grid="${state.gridW}x${state.gridH}" bleed="${state.bleed}" padding="${state.padding}" font-size="${state.fontSize}" layers="${layersStr}"}`;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user