Browse Source
Merge pull request #393 from Budibase/colorpicker/fixing-broken-colorpicker
Fixing Colorpicker Duplication Issues
gh-pages
Conor_Mack
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
0 additions and
49 deletions
-
packages/builder/src/components/userInterface/Colorpicker/Colorpicker.svelte
-
packages/builder/src/components/userInterface/Colorpicker/Input.svelte
-
packages/builder/src/components/userInterface/Colorpicker/Slider.svelte
|
|
|
@ -149,39 +149,6 @@ |
|
|
|
$: shrink = swatches.length > 0 |
|
|
|
</script> |
|
|
|
|
|
|
|
<div class="colorpicker-container"> |
|
|
|
|
|
|
|
<div class="palette-panel"> |
|
|
|
<Palette on:change={setSaturationAndValue} {h} {s} {v} {a} /> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="control-panel"> |
|
|
|
<div class="alpha-hue-panel"> |
|
|
|
<div> |
|
|
|
<CheckedBackground borderRadius="50%" backgroundSize="8px"> |
|
|
|
<div class="selected-color" {style} /> |
|
|
|
</CheckedBackground> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<Slider type="hue" value={h} on:change={hue => setHue(hue.detail)} /> |
|
|
|
|
|
|
|
<CheckedBackground borderRadius="10px" backgroundSize="7px"> |
|
|
|
<Slider |
|
|
|
type="alpha" |
|
|
|
value={a} |
|
|
|
on:change={alpha => setAlpha(alpha.detail)} /> |
|
|
|
</CheckedBackground> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="format-input-panel"> |
|
|
|
<ButtonGroup {format} onclick={changeFormatAndConvert} /> |
|
|
|
<Input {value} on:input={event => handleColorInput(event.target.value)} /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div |
|
|
|
class="colorpicker-container" |
|
|
|
bind:clientHeight={pickerHeight} |
|
|
|
|
|
|
|
@ -2,9 +2,6 @@ |
|
|
|
export let value = "" |
|
|
|
</script> |
|
|
|
|
|
|
|
<div> |
|
|
|
<input on:input type="text" {value} maxlength="25" /> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<input on:input on:change type="text" {value} maxlength="25" /> |
|
|
|
</div> |
|
|
|
|
|
|
|
@ -29,19 +29,6 @@ |
|
|
|
$: style = `transform: translateX(${thumbPosition - 6}px);` |
|
|
|
</script> |
|
|
|
|
|
|
|
<div |
|
|
|
bind:this={slider} |
|
|
|
bind:clientWidth={sliderWidth} |
|
|
|
on:click={event => handleClick(event.clientX)} |
|
|
|
class="color-format-slider" |
|
|
|
class:hue={type === 'hue'} |
|
|
|
class:alpha={type === 'alpha'}> |
|
|
|
<div |
|
|
|
use:dragable |
|
|
|
on:drag={e => handleClick(e.detail)} |
|
|
|
class="slider-thumb" |
|
|
|
{style} /> |
|
|
|
</div> |
|
|
|
<div |
|
|
|
bind:this={slider} |
|
|
|
bind:clientWidth={sliderWidth} |
|
|
|
|