Merge branch 'interface-changes' into develop
This commit is contained in:
commit
a34ac769ae
@ -13,19 +13,19 @@
|
||||
</article>
|
||||
<div class="content" id="controls">
|
||||
<div class="control-wrapper">
|
||||
<label class="control-label" for="amount">glitch amount</label>
|
||||
<label class="control-label" for="amount">glitch amount <span class="control-slider-value"></span></label>
|
||||
<input class="control-input" type="range" id="amount" min="0" max="100" value="50" />
|
||||
</div>
|
||||
<div class="control-wrapper">
|
||||
<label class="control-label" for="seed">seed</label>
|
||||
<label class="control-label" for="seed">seed <span class="control-slider-value"></span></label>
|
||||
<input class="control-input" type="range" id="seed" min="0" max="100" value="50" />
|
||||
</div>
|
||||
<div class="control-wrapper">
|
||||
<label class="control-label" for="iterations">iterations</label>
|
||||
<label class="control-label" for="iterations">iterations <span class="control-slider-value"></span></label>
|
||||
<input class="control-input" type="range" id="iterations" min="1" max="50" value="5" />
|
||||
</div>
|
||||
<div class="control-wrapper">
|
||||
<label class="control-label" for="quality">jpg quality</label>
|
||||
<label class="control-label" for="quality">jpg quality <span class="control-slider-value"></span></label>
|
||||
<input class="control-input" type="range" id="quality" min="1" max="90" value="50" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
8
scripts/src/controls.js
vendored
8
scripts/src/controls.js
vendored
@ -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 };
|
||||
}
|
||||
);
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user