From: Robert Konigsberg Date: Tue, 17 Jan 2012 01:13:35 +0000 (-0800) Subject: Merge pull request #110 from kberg/master X-Git-Tag: v1.0.0~343 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=26e931301c0e8086a409f940acf4cf601736c6da;hp=56f64289bdbd75dea1ee58faf529d39465d11008;p=dygraphs.git Merge pull request #110 from kberg/master last tweaks before announcing. --- diff --git a/common/textarea.js b/common/textarea.js index ce45d8a..d0e1c31 100644 --- a/common/textarea.js +++ b/common/textarea.js @@ -38,6 +38,8 @@ function TextArea(parent) { this.ok.textContent = "OK"; this.cancel = TextArea.createChild("button", this.buttons); this.cancel.textContent = "Cancel"; + this.height = 315; + this.width = 445; var textarea = this; this.ok.onclick = function() { @@ -80,10 +82,6 @@ TextArea.prototype.show = function(title, content) { this.title.textContent = title; this.textarea.value = content; - var height = 315; - var width = 445; - - var sums = function(adds, subtracts, field) { var total = 0; for (var idx in adds) { @@ -97,8 +95,8 @@ TextArea.prototype.show = function(title, content) { this.elem.style.display = "block"; this.background.style.display = "block"; - this.elem.style.height = height + "px"; - this.elem.style.width = width + "px"; + this.elem.style.height = this.height + "px"; + this.elem.style.width = this.width + "px"; this.textarea.style.height = (-18 + sums([this.elem], [this.title, this.buttons], "offsetHeight")) + "px"; this.textarea.style.width = (-16 + sums([this.elem], [ ], "offsetWidth")) + "px"; diff --git a/gallery/gallery.css b/gallery/gallery.css index 92d240c..d5b4358 100644 --- a/gallery/gallery.css +++ b/gallery/gallery.css @@ -13,11 +13,18 @@ aside { vertical-align: top; width: 200px; } +#gap { + style="width:0.5em;" +} -#rhs { +#rhs, #lhs { vertical-align: top; } +#subtitle a:visited { + color: blue; +} + #workarea { border-style: solid; border-color: #ddd; diff --git a/gallery/gallery.js b/gallery/gallery.js index bdf2386..dec3cb3 100644 --- a/gallery/gallery.js +++ b/gallery/gallery.js @@ -20,9 +20,12 @@ Gallery.start = function() { Gallery.toc = document.getElementById("toc"); Gallery.workarea = document.getElementById("workarea"); Gallery.subtitle = Gallery.create("div", Gallery.workarea); + Gallery.subtitle.id = "subtitle"; Gallery.workareaChild = Gallery.create("div", Gallery.workarea); Gallery.title = document.getElementById("title"); Gallery.textarea = new TextArea(); + Gallery.textarea.width = 600; + Gallery.textarea.height = 400; for (var idx in Gallery.entryOrder) { var id = Gallery.entryOrder[idx]; diff --git a/gallery/index.html b/gallery/index.html index b284d50..360bdec 100644 --- a/gallery/index.html +++ b/gallery/index.html @@ -57,8 +57,12 @@ - - + +
+
+ Back to Dygraphs. + +
diff --git a/gallery/interaction.js b/gallery/interaction.js index 69a812c..fd50def 100644 --- a/gallery/interaction.js +++ b/gallery/interaction.js @@ -5,7 +5,7 @@ Gallery.register( title: 'title', setup: function(parent) { parent.innerHTML = [ - "

Default interaction model

", + "

Default interaction model

", "
", "

", " Zoom: click-drag, Pan: shift-click-drag, Restore: double-click", @@ -13,7 +13,7 @@ Gallery.register( "

", "
", "", - "

Empty interaction model

", + "

Empty interaction model

", "
", "

", " Click and drag all you like, it won't do anything!", @@ -22,7 +22,7 @@ Gallery.register( "

", "
", // what is this? "", - "

Custom interaction model

", + "

Custom interaction model

", "
", "

", " Zoom in: double-click, scroll wheel
", @@ -34,7 +34,7 @@ Gallery.register( " ", "

", "
", - "

Fun model!

", + "

Fun model!

", "
", "

", " Keep the mouse button pressed, and hover over all points",