From 2c03829a83e8bcffbc5aee69b8fb0dddad009a28 Mon Sep 17 00:00:00 2001 From: George Michael Brower Date: Sun, 23 Jan 2011 17:50:14 -0700 Subject: [PATCH] Changes to gui.css --- controller.js | 9 +++++++-- gui.css | 31 +++++++++++++++++++++++++++++-- gui.js | 6 ++++-- 3 files changed, 40 insertions(+), 6 deletions(-) diff --git a/controller.js b/controller.js index 6b140f2..812fb3b 100644 --- a/controller.js +++ b/controller.js @@ -1,9 +1,14 @@ -var Controller = function() { +var Controller = function(object, propertyName) { this.domElement = document.createElement('div'); this.domElement.setAttribute('class', 'guidat-controller'); - + this.object = arguments[0]; this.propertyName = arguments[1]; + + this.propertyNameElement = document.createElement('span'); + this.propertyNameElement.setAttribute('class', 'guidat-propertyname'); + this.propertyNameElement.innerHTML = arguments[1]; + this.domElement.appendChild(this.propertyNameElement); }; var NumberController = function() { diff --git a/gui.css b/gui.css index 166e034..7da8a75 100644 --- a/gui.css +++ b/gui.css @@ -7,16 +7,19 @@ top: 0; left: 100%; margin-left: -270px; + background-color: #fff; -moz-transition: margin-top .2s ease-out; -webkit-transition: margin-top .2s ease-out; transition: margin-top .2s ease-out; - background-color: #fff; -webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3); + box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3); } #guidat-controllers { height: 300px; - overflow-y: scroll; + overflow-y: auto; + background-color: #eee; } #guidat-toggle { @@ -32,4 +35,28 @@ #guidat-toggle:hover { background-color: #000; +} + +.guidat-controller { + padding: 5px; + border-bottom: 1px solid #ccc; + text-align: right; + background-color: #fff; +} + +.guidat-controller:nth-child(even) { + background-color: #E1F9FF; +} + +.guidat-controller:last-child { + border-bottom: 1px solid #ccc; + -webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1); + box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1); +} + +.guidat-propertyname { + float: left; + margin: 5px; + font-size: 11px; } \ No newline at end of file diff --git a/gui.js b/gui.js index 5dca45e..88c745c 100644 --- a/gui.js +++ b/gui.js @@ -57,8 +57,10 @@ var GUI = new function() { var addHandlers = { "number": function() { - var n = new NumberController(arguments); - return n; + + return new NumberController(arguments); + + // return n.button; }, "string": function() {