@idraw/board
Advanced tools
Comparing version 0.1.12 to 0.1.13
@@ -327,2 +327,3 @@ 'use strict'; | ||
canvas.addEventListener('mouseleave', this._listenMoveEnd.bind(this), true); | ||
canvas.addEventListener('mouseleave', this._listenLeave.bind(this), true); | ||
canvas.addEventListener('click', this._listenClick.bind(this), true); | ||
@@ -344,2 +345,8 @@ canvas.addEventListener('wheel', this._listenWheel.bind(this), true); | ||
}; | ||
Watcher.prototype._listenLeave = function (e) { | ||
e.preventDefault(); | ||
if (this._event.has('leave')) { | ||
this._event.trigger('leave', undefined); | ||
} | ||
}; | ||
Watcher.prototype._listenMoveStart = function (e) { | ||
@@ -346,0 +353,0 @@ e.preventDefault(); |
@@ -176,2 +176,3 @@ import { TypeBoardOptions } from '@idraw/types'; | ||
'hover': TypePoint; | ||
'leave': void; | ||
'point': TypePoint; | ||
@@ -178,0 +179,0 @@ 'move': TypePoint; |
@@ -325,2 +325,3 @@ var __assign = function() { | ||
canvas.addEventListener('mouseleave', this._listenMoveEnd.bind(this), true); | ||
canvas.addEventListener('mouseleave', this._listenLeave.bind(this), true); | ||
canvas.addEventListener('click', this._listenClick.bind(this), true); | ||
@@ -342,2 +343,8 @@ canvas.addEventListener('wheel', this._listenWheel.bind(this), true); | ||
}; | ||
Watcher.prototype._listenLeave = function (e) { | ||
e.preventDefault(); | ||
if (this._event.has('leave')) { | ||
this._event.trigger('leave', undefined); | ||
} | ||
}; | ||
Watcher.prototype._listenMoveStart = function (e) { | ||
@@ -344,0 +351,0 @@ e.preventDefault(); |
@@ -328,2 +328,3 @@ var iDrawBoard = (function () { | ||
canvas.addEventListener('mouseleave', this._listenMoveEnd.bind(this), true); | ||
canvas.addEventListener('mouseleave', this._listenLeave.bind(this), true); | ||
canvas.addEventListener('click', this._listenClick.bind(this), true); | ||
@@ -345,2 +346,8 @@ canvas.addEventListener('wheel', this._listenWheel.bind(this), true); | ||
}; | ||
Watcher.prototype._listenLeave = function (e) { | ||
e.preventDefault(); | ||
if (this._event.has('leave')) { | ||
this._event.trigger('leave', undefined); | ||
} | ||
}; | ||
Watcher.prototype._listenMoveStart = function (e) { | ||
@@ -347,0 +354,0 @@ e.preventDefault(); |
{ | ||
"name": "@idraw/board", | ||
"version": "0.1.12", | ||
"version": "0.1.13", | ||
"description": "", | ||
@@ -26,6 +26,6 @@ "main": "dist/index.cjs.js", | ||
"devDependencies": { | ||
"@idraw/types": "^0.1.12" | ||
"@idraw/types": "^0.1.13" | ||
}, | ||
"dependencies": { | ||
"@idraw/util": "^0.1.12" | ||
"@idraw/util": "^0.1.13" | ||
}, | ||
@@ -35,3 +35,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "f0d77faa2f0a372f2d92cda9b67cf38a4fa52370" | ||
"gitHead": "9b6756eee985ede2a60b33ca3a8d47c21c01910c" | ||
} |
135936
3443
Updated@idraw/util@^0.1.13