Skip to content

Commit

Permalink
re-enable displaying saturation in hue bar
Browse files Browse the repository at this point in the history
  • Loading branch information
CarelessCourage committed Feb 4, 2024
1 parent b51d01a commit 6363c98
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/dye/components/Canvas/HueCanvas.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,17 @@ function fillHueCanvas(color: string = props.color.hex) {
ctx.fillRect(0, 0, width, height)
}
const { setMouseDown, offCanvas, isActiveCanvas } = useDyeStore()
watch(
() => props.color.hex,
(color) => {
console.log('color', mouseOn)
//fillHueCanvas(color)
const isActive = isActiveCanvas(hueCanvas.value)
if (!isActive) return
fillHueCanvas(color)
}
)
const { setMouseDown, offCanvas, isActiveCanvas } = useDyeStore()
function hueChange(e: MouseEvent, click = false) {
if (click) setMouseDown(true)
if (offCanvas(e, click)) return
Expand Down

0 comments on commit 6363c98

Please sign in to comment.