Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use allowEmpty at showPaletteOnly #545

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Ji-yeonPark
Copy link

Hi there.

There was solution for this function at #473 , but that was not work for me.
so, I fixed small error about "showPaletteOnly & allowEmpty".

✈️ HOW TO USE -1
This code can use allowEmpty option at "showPaletteOnly : true".

  • set allowEmpty to true
  • Put the '' at palette where you want it.
$("#shadow").spectrum({
        showPaletteOnly: true,
        allowEmpty: true,
        palette: [
            ['', 'black', 'white'],
            ['green', 'blue', 'yellow']
        ]
})

✈️ RESULT

image

✈️ HOW TO USE -2
it can be used "allowEmpty" option normally.

  • set allowEmpty to true
$("#shadow").spectrum({
        allowEmpty: true,
        color: "#ff0000",
})

✈️ RESULT

image

Fixed allowEmpty error.
W004: 'c' is already defined.
W033: Missing semicolon.
W041: Use '===' to compare with ''.
W041: Use '===' to compare with ''.
W033: Missing semicolon.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant