Skip to content

Commit 18d8b7b

Browse files
author
HarshKhandeparkar
committed
example: use new tool format
1 parent 86985a9 commit 18d8b7b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

example/examples/drawboard.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ colorWheel.on('input:change', color => {
3737
])
3838
})
3939

40-
const drawModeSelector = document.querySelector('#draw-mode');
41-
drawModeSelector.addEventListener('change', e => {
40+
const toolSelector = document.querySelector('#draw-tool');
41+
toolSelector.addEventListener('change', e => {
4242
e.preventDefault();
43-
DrawBoard.changeMode(drawModeSelector.value);
43+
DrawBoard.changeTool(toolSelector.value);
4444
})
4545

4646
const brushSizeRange = document.querySelector('#brush-size');

example/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ <h3># Drawing Board</h3>
4545
<canvas id="drawboard-canvas"></canvas> <br />
4646

4747
<form id="drawboard-form">
48-
<label for="draw-mode">Draw Mode: </label>
49-
<select name="draw-mode" id="draw-mode" value="paint">
50-
<option value="paint">Paint</option>
48+
<label for="draw-tool">Tool: </label>
49+
<select name="draw-tool" id="draw-tool" value="brush">
50+
<option value="brush">Brush</option>
5151
<option value="erase">Erase</option>
5252
</select>
5353
<br />

0 commit comments

Comments
 (0)