Skip to content

Commit 1d04a97

Browse files
committed
ontool
1 parent 17783cd commit 1d04a97

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "croquis.js",
33
"main": "croquis.js",
4-
"version": "0.1.1",
4+
"version": "0.1.2",
55
"homepage": "https://github.com/disjukr/croquis.js",
66
"authors": [
77
"JongChan Choi <disjukr@naver.com>"

croquis.js

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ function Croquis(imageDataList, properties) {
2222
'onup': [],
2323
'ontick': [],
2424
'onchange': [],
25+
'ontool': [],
2526
'onlayeradd': [],
2627
'onlayerremove': [],
2728
'onlayerswap': [],
@@ -595,6 +596,7 @@ function Croquis(imageDataList, properties) {
595596
}
596597
self.setTool = function (value) {
597598
tool = value;
599+
dispatchEvent('ontool', {tool: value});
598600
paintingContext = paintingCanvas.getContext('2d');
599601
if (tool && tool.setContext)
600602
tool.setContext(paintingContext);

0 commit comments

Comments
 (0)