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() {
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) {
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";
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];
title: 'title',
setup: function(parent) {
parent.innerHTML = [
- "<h2>Default interaction model</h2>",
+ "<h3>Default interaction model</h3>",
"<div style='width:600px;'>",
" <p style='text-align:center;'>",
" Zoom: click-drag, Pan: shift-click-drag, Restore: double-click",
" <div id='div_g' style='width:600px; height:300px;'></div>",
"</div>",
"",
- "<h2>Empty interaction model</h2>",
+ "<h3>Empty interaction model</h3>",
"<div style='width:600px;'>",
" <p style='text-align:center;'>",
" Click and drag all you like, it won't do anything!",
"</div>",
"<div id='g2_console'></div>", // what is this?
"",
- "<h2>Custom interaction model</h2>",
+ "<h3>Custom interaction model</h3>",
"<div style='width:600px;'>",
" <p style='text-align:center;'>",
" Zoom in: double-click, scroll wheel<br/>",
" <button id='restore3'>Restore position</button>",
" <div id='div_g3' style='width:600px; height:300px;'></div>",
"</div>",
- "<h2>Fun model!</h2>",
+ "<h3>Fun model!</h3>",
"<div style='width:600px;'>",
" <p style='text-align:center;'>",
" Keep the mouse button pressed, and hover over all points",