From d14512b45496bd3b3bab19f5c187a40bcf18a7da Mon Sep 17 00:00:00 2001 From: George Michael Brower Date: Fri, 28 Jan 2011 14:19:26 -0700 Subject: [PATCH] Changes to index --- controllers/controller.number.js | 1 + demo/demo.css | 11 ++++++++++- gui.js | 2 -- index.html | 21 +++++++++++++++++---- 4 files changed, 28 insertions(+), 7 deletions(-) diff --git a/controllers/controller.number.js b/controllers/controller.number.js index a98223a..b6cef94 100644 --- a/controllers/controller.number.js +++ b/controllers/controller.number.js @@ -114,6 +114,7 @@ var NumberController = function() { } else if (max != undefined && val >= max) { val = max; } + _this.setValue(val); numberField.value = roundToDecimal(_this.getValue(), 4); diff --git a/demo/demo.css b/demo/demo.css index 249401c..f4fb66b 100644 --- a/demo/demo.css +++ b/demo/demo.css @@ -8,11 +8,21 @@ body { padding: 0 20px 20px 20px; } +#container { +max-width: 530px; +} + h1, h2, h3, h4, h5, h6 { font-family: "Helvetica Neue", helvetica, arial, sans-serif; color: #222; } +hr { +border: 0; +height: 0; +border-top: 1px dotted #ccc; +} + h1 { font-size: 80px; font-weight: 800; @@ -68,7 +78,6 @@ pre { p, ul { font-size: 125%; - max-width: 530px; line-height: 18px; margin-bottom: 24px; } diff --git a/gui.js b/gui.js index 95a5ad5..03d3c8c 100644 --- a/gui.js +++ b/gui.js @@ -147,6 +147,4 @@ var GUI = new function() { open = false; } - - }; diff --git a/index.html b/index.html index 2981c69..dffb602 100644 --- a/index.html +++ b/index.html @@ -49,6 +49,7 @@ +

GUI-DAT flag

@@ -62,7 +63,7 @@

Basic Usage

-
<script type="text/javascript" src="demo/demo.js"></script>
+        
<script type="text/javascript" src="demo/demo.js"></script>
 <script type="text/javascript">
 
 window.onload = function() {
@@ -79,14 +80,14 @@ window.onload = function() {
    GUI.add(fizzyText, "growthSpeed", 0.01, 1);
    GUI.add(fizzyText, "speed", 0.1, 2);
    
-   // Sliders with min, max and increment.
+   // Sliders with min, max and increment
    GUI.add(fizzyText, "noiseStrength", 10, 100, 5);
    
    // Boolean checkbox
    GUI.add(fizzyText, "displayOutline");
 
    // Fires a function called "explode"
-   GUI.add(fizzyText, "explode").setName('Explode!'); // Specify a custom name.
+   GUI.add(fizzyText, "explode").setName("Explode!"); // Specify a custom name.
    
 };
 
@@ -96,8 +97,20 @@ window.onload = function() {
     		
  • gui-dat will infer the type of the property you're trying to add
    (based on its initial value) and create the corresponding control.
  • The properties must be public, i.e. defined by this.prop = value.
  • + +
    \ No newline at end of file