diff --git a/index.html b/index.html index 4678135..eb95090 100644 --- a/index.html +++ b/index.html @@ -13,19 +13,19 @@
- +
- +
- +
- +
diff --git a/scripts/src/controls.js b/scripts/src/controls.js index cb8c3e0..2237f1c 100644 --- a/scripts/src/controls.js +++ b/scripts/src/controls.js @@ -23,6 +23,7 @@ define( control.addEventListener( 'change', controlUpdated, false ); updateValue( control.id, control.value ); + updateValueInUI( control.id, control.value ); } is_initialized = true; @@ -36,6 +37,7 @@ define( var target = event.target; updateValue( target.id, target.value ); + updateValueInUI( target.id, target.value ); } function updateValue( key, value ) @@ -48,6 +50,12 @@ define( } } + function updateValueInUI( key, value ) + { + var el = document.querySelectorAll( 'label[for="' + key + '"] .control-slider-value' )[0]; + el.innerHTML = value; + } + return { init: init }; } ); \ No newline at end of file diff --git a/styles/global.css b/styles/global.css index d6970a2..3bca8c3 100644 --- a/styles/global.css +++ b/styles/global.css @@ -83,12 +83,20 @@ a:hover color: #666; } + .control-slider-value + { + display: inline-block; + color: #333; + float: right; + } + .control-input { display: block; width: 100px; } + #import-input { display: none;