show labels for brush width
parent
2a6de5163b
commit
4f7e25eeb9
|
@ -75,7 +75,7 @@
|
|||
|
||||
<div id="controls">
|
||||
<button id="clear">Clear</button>
|
||||
<input id="width" type="number" value="5"></input>
|
||||
<input id="width" type="range" value="5" min="1" max="100"></input><label for="width">5</label>
|
||||
<div id="colors"> </div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -45,8 +45,11 @@ define([
|
|||
var $canvasContainer = $('canvas').parents('.canvas-container');
|
||||
|
||||
var $width = $('#width');
|
||||
var $widthLabel = $('label[for="width"]');
|
||||
var updateBrushWidth = function () {
|
||||
canvas.freeDrawingBrush.width = Number($width.val());
|
||||
var val = $width.val();
|
||||
canvas.freeDrawingBrush.width = Number(val);
|
||||
$widthLabel.text(val);
|
||||
};
|
||||
updateBrushWidth();
|
||||
|
||||
|
|
Loading…
Reference in New Issue