X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;ds=sidebyside;f=experimental%2Fpalette%2Fpalette.js;h=514463f554c45d374cb8ec6497c0b672c9133a12;hb=90ccd1c3393245e04a64a849e4c4e9f3e2d73c05;hp=2e9acb2479c9e7eb3c1af9081e0384390bffadc9;hpb=58a18b025156273cc34cd7555f77369e1f924d74;p=dygraphs.git diff --git a/experimental/palette/palette.js b/experimental/palette/palette.js index 2e9acb2..514463f 100644 --- a/experimental/palette/palette.js +++ b/experimental/palette/palette.js @@ -30,6 +30,7 @@ */ function Palette(scope) { // Contains pair of "input" (the input object) and "row" (the parent row) + // Also contains functionString. this.model = {}; // This is meant to be overridden by a palette host. this.onchange = function() {}; @@ -37,104 +38,96 @@ function Palette(scope) { this.root = null; } -Palette.createChild = function(type, parentElement, className) { - var element = document.createElement(type); - parentElement.appendChild(element); - if (className) { - element.className = className; - } - return element; -}; - Palette.prototype.create = function(parentElement) { var palette = this; - var table = Palette.createChild("div", parentElement[0], "palette"); - this.root = table; - table.width="300px"; + var table = $("