Updated for ember-cli 3.12, thanks to @alexdiliberto! This updates the NodeJS version requirement from 4.0 to 8.0.
Exposes getOptions
, setCallbacks
and initSpectrum
to allow easier customization from subclassed components,
thanks to @nateevans!
The palette
option will now dynamically update, thanks to @coreypmurphy.
Adds configuration option to disable including the default css in case you wish to provide your own css:
// config/environment.js
...
let ENV = {
...
emberSpectrumColorPicker: {
includeStyles: false
}
}
...
This version drops the dependency on Bower and switches to NPM to manage the Spectrum.js dependency. If this causes problems with your application, please let me know in issue 17.
Adds maxSelectionSize
attribute, which sets the maximum number of colors shown on the palette (thanks @sethphillips!).
Adds onMove
, onShow
, and onHide
attributes which can be set to an action. The action handlers will receive the
new color value as a parameter upon a color change:
Adds an onChange
attribute which can be set to an action. The action handler will receive the new color value as
a parameter upon a color change:
The disabled
property is now a two-way binding so dynamically disabling/enabling is now possible.
Previously the update function would always return the color formatted as a hexadecimal value. This meant that after
a color was picked, the bound color property would always become a hex value, regardless of the prefferedFormat
set
or inferred from the initial value.
Now the update function respects the prefferedFormat
or inferred format and will return a color string formatted
accordingly.