Skip to content

Commit

Permalink
force line wrap for chart controls
Browse files Browse the repository at this point in the history
  • Loading branch information
mcnuttandrew committed Aug 22, 2024
1 parent 7ca179f commit f466520
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
6 changes: 5 additions & 1 deletion apps/color-buddy/src/content-modules/MainColumn.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@
: currentPal.colors.map((x) => cvdSim(selectedCVDType, x))}
/>

<div class="flex flex-wrap" id="scatterplot-controls">
<div
class="flex flex-wrap"
id="scatterplot-controls"
style={`max-width: ${scatterSize + 110}px;`}
>
<button
class={`${buttonStyle} pl-0`}
on:click={() => configStore.setScatterplotMode("putting")}
Expand Down
10 changes: 8 additions & 2 deletions apps/color-buddy/src/controls/AdjustOrder.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@
$: colors = $colorStore.palettes[$colorStore.currentPal].colors;
$: focused = $focusStore.focusedColors;
$: buttonsActive = focused.length > 0;
$: style = buttonStyle
.split(" ")
.filter((x) => !x.startsWith("opacity-50"))
.join(" ");
</script>

<button
class="{buttonStyle} mr-2"
class="{style} mr-2"
class:opacity-30={!buttonsActive}
class:opacity-50={buttonsActive}
class:cursor-not-allowed={!buttonsActive}
on:click|stopPropagation|preventDefault={() => {
// move every element to the left
Expand All @@ -32,8 +37,9 @@
Move left
</button>
<button
class="{buttonStyle} mr-2"
class="{style} mr-2"
class:opacity-30={!buttonsActive}
class:opacity-50={buttonsActive}
class:cursor-not-allowed={!buttonsActive}
on:click|stopPropagation|preventDefault={() => {
// move every element to the right
Expand Down
2 changes: 1 addition & 1 deletion apps/color-buddy/src/controls/ModifySelection.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
...currentPal.colors.filter((_, idx) => focusedSet.has(idx)),
])}
>
Duplicate
Clone
</button>

<style>
Expand Down

0 comments on commit f466520

Please sign in to comment.