From: Robert Konigsberg Date: Sun, 15 Jan 2012 16:05:39 +0000 (-0500) Subject: Add resize to gallery. It's got a bug in which I had to manually position it, and... X-Git-Tag: v1.0.0~320^2~20 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=328d2ccee498aefe549041b5c8a2b4a97a29fea1;p=dygraphs.git Add resize to gallery. It's got a bug in which I had to manually position it, and it's not inside the gray border. Not sure. --- diff --git a/gallery/gallery.css b/gallery/gallery.css index c0b5837..cc83a2b 100644 --- a/gallery/gallery.css +++ b/gallery/gallery.css @@ -84,3 +84,13 @@ aside { border-style: solid; border-color: black; } + +/* CSS for resize */ +#workarea #resize #div_g { + /* The left and top are just guesses, this needs a proper run-through */ + position: absolute; + left: 200px; + right: 10px; + top: 100px; + bottom: 10px; +} \ No newline at end of file diff --git a/gallery/index.html b/gallery/index.html index 13d6ab0..d4cda27 100644 --- a/gallery/index.html +++ b/gallery/index.html @@ -23,6 +23,7 @@ + diff --git a/gallery/resize.js b/gallery/resize.js new file mode 100644 index 0000000..c11d529 --- /dev/null +++ b/gallery/resize.js @@ -0,0 +1,18 @@ +Gallery.register( + 'resize', + { + name: 'Resizable Graph', + title: 'Resize the window. The dygraph will resize with it.', + setup: function(parent) { + parent.innerHTML = "
"; + }, + run: function() { + g = new Dygraph( + document.getElementById("div_g"), + NoisyData, { + rollPeriod: 7, + errorBars: true + } + ); + } + });