X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=experimental%2Fpalette%2Fpalette.js;h=514463f554c45d374cb8ec6497c0b672c9133a12;hb=refs%2Fheads%2Fsmall-files-closure;hp=2e9acb2479c9e7eb3c1af9081e0384390bffadc9;hpb=0193e7efb2dec61f5bbfdce8e355babe87b7001f;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 = $("