Skip to content

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