Skip to content

KnockoutJS: Palette Editor

Dmitry Voytsekhovskiy edited this page Mar 17, 2017 · 3 revisions
  • iddEditorColorPalette allows to set an instance of InteractiveDataDisplay.ColorPalette to InteractiveDataDisplay.ColorPaletteEditor.

Example:

<div class="paletteEditor" style="width:250px;" 
             data-bind="event: { paletteChanged: onPaletteChanged }, iddEditorColorPalette: colorPalette"></div>
var viewModel = {
   colorPalette: ko.observable(InteractiveDataDisplay.ColorPalette.parse('blue,green,red')),
   onPaletteChanged: function(vm, event, newPalette){   
   }
};