Skip to content

Commit

Permalink
revert: "feat: add setting for wider inputs"
Browse files Browse the repository at this point in the history
This reverts commit 36d560b.
  • Loading branch information
istudyatuni committed May 13, 2022
1 parent 14cb458 commit d457b84
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 24 deletions.
22 changes: 3 additions & 19 deletions src/components/Settings.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -71,33 +71,17 @@
</span>
</div>

<div class="mb-2">
<input
id="wider_inputs_checkbox"
type="checkbox"
bind:checked={$settings.wider_inputs} />
<label for="wider_inputs_checkbox">Wider inputs</label>
</div>
<div class="flex mb-2">
<p>x: [</p>
<InputNumber
bind:value={$drawStore.lx}
on:change={should_redraw}
wider={$settings.wider_inputs} />
<InputNumber bind:value={$drawStore.lx} on:change={should_redraw} />
<p>;</p>
<InputNumber
bind:value={$drawStore.rx}
on:change={should_redraw}
wider={$settings.wider_inputs} />
<InputNumber bind:value={$drawStore.rx} on:change={should_redraw} />
<p>]</p>
</div>

<div class="flex mb-2">
<p>y:</p>
<InputNumber
bind:value={$drawStore.yc}
on:change={should_redraw}
wider={$settings.wider_inputs} />
<InputNumber bind:value={$drawStore.yc} on:change={should_redraw} />
</div>

<div class="mb-2">
Expand Down
6 changes: 2 additions & 4 deletions src/components/atoms/InputNumber.svelte
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<script>
export let value,
wider = false
$: wider_class = wider ? 'w-2/5' : 'w-1/4'
export let value
</script>

<span class="rounded mx-1 {wider_class}">
<span class="rounded mx-1 w-3/7">
<input type="number" class="w-full px-1 rounded" bind:value on:change />
</span>
1 change: 0 additions & 1 deletion src/stores/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export const draw = sessionStore('draw-settings', {
export const settings = sessionStore('settings', {
palette: default_map,
show_settings: true,
wider_inputs: false,
})

function parseHash() {
Expand Down

0 comments on commit d457b84

Please sign in to comment.