Skip to content

Commit 8899077

Browse files
committed
oncanvassize
1 parent 1d04a97 commit 8899077

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-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.2",
4+
"version": "0.1.3",
55
"homepage": "https://github.com/disjukr/croquis.js",
66
"authors": [
77
"JongChan Choi <disjukr@naver.com>"

croquis.js

+5
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ function Croquis(imageDataList, properties) {
2323
'ontick': [],
2424
'onchange': [],
2525
'ontool': [],
26+
'oncanvassize': [],
2627
'onlayeradd': [],
2728
'onlayerremove': [],
2829
'onlayerswap': [],
@@ -315,6 +316,10 @@ function Croquis(imageDataList, properties) {
315316
self.setCanvasSize = function (width, height, offsetX, offsetY) {
316317
offsetX = (offsetX == null) ? 0 : offsetX;
317318
offsetY = (offsetY == null) ? 0 : offsetY;
319+
dispatchEvent('oncanvassize', {
320+
width: width, height: height,
321+
offsetX: offsetX, offsetY: offsetY
322+
});
318323
pushCanvasSizeUndo(width, height, offsetX, offsetY);
319324
size.width = width = Math.floor(width);
320325
size.height = height = Math.floor(height);

0 commit comments

Comments
 (0)