diff --git a/docs/docs.js b/docs/docs.js index abd11a7d..6d700915 100644 --- a/docs/docs.js +++ b/docs/docs.js @@ -250,6 +250,26 @@ $("#showPaletteOnly").spectrum({ } }); +$("#showPaletteOnlyEmpty").spectrum({ + color: 'blanchedalmond', + showPaletteOnly: true, + showPalette:true, + palette: [ + ['black', 'white', 'blanchedalmond', 'violet'], + ['red', 'yellow', 'green', 'blue'] + ], + change: function(c) { + var label = $("[data-label-for=" + this.id + "]"); + label.text("Change called: " + (c ? c.toHexString() : "transparent")); + }, + move: function(c) { + var label = $("[data-label-for=" + this.id + "]"); + label.text("Move called: " + (c ? c.toHexString() : "transparent")); + }, + allowEmpty: true +}); + + $("#hideAfterPaletteSelect").spectrum({ showPaletteOnly: true, showPalette:true, diff --git a/index.html b/index.html index a9d800d9..b4a3e1c4 100644 --- a/index.html +++ b/index.html @@ -350,13 +350,23 @@
$("#showPaletteOnly").spectrum({
showPaletteOnly: true,
- showPalette:true,
+ showPalette: true,
color: 'blanchedalmond',
palette: [
['black', 'white', 'blanchedalmond',
'rgb(255, 128, 0);', 'hsv 100 70 50'],
['red', 'yellow', 'green', 'blue', 'violet']
]
+});
+$("#showPaletteOnlyEmpty").spectrum({
+ showPaletteOnly: true,
+ showPalette: true,
+ color: 'blanchedalmond',
+ palette: [
+ ['black', 'white', 'blanchedalmond', 'violet'],
+ ['red', 'yellow', 'green', 'blue']
+ ],
+ allowEmpty: true
});