Skip to content

Commit

Permalink
refactor: port MathCellConfigDialog to runes mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mgreminger committed Dec 31, 2024
1 parent d0ae6da commit 15ac0f3
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/MathCellConfigDialog.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,20 @@
type MathCellConfig, getSafeMathConfig, mathConfigLimits } from "./sheet/Sheet";
import { unsavedChange, autosaveNeeded, mathCellChanged } from "./stores.svelte";
export let mathCellConfig: MathCellConfig | null;
export let cellLevelConfig = false;
export let setCellNumberConfig: (input: MathCellConfig) => void | null = null;
interface Props {
mathCellConfig: MathCellConfig;
cellLevelConfig?: boolean;
setCellNumberConfig?: (input: MathCellConfig) => void;
}
let {
mathCellConfig=$bindable(),
cellLevelConfig=false,
setCellNumberConfig
}: Props = $props();
let defaultMathConfig = defaultConfig.mathCellConfig;
let currentMathCellConfig = copyMathConfig(mathCellConfig) ?? copyMathConfig(defaultMathConfig);
let currentMathCellConfig = $state(copyMathConfig(mathCellConfig) ?? copyMathConfig(defaultMathConfig));
export function resetDefaults() {
currentMathCellConfig = copyMathConfig(defaultMathConfig);
Expand Down

0 comments on commit 15ac0f3

Please sign in to comment.