mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 20:48:28 +08:00
Merge branch 'feat/context_menu_handler' of https://github.com/joaolrpaulo/konva into joaolrpaulo-feat/context_menu_handler
This commit is contained in:
commit
34d40d57e7
@ -12,6 +12,7 @@
|
||||
MOUSEMOVE = 'mousemove',
|
||||
MOUSEDOWN = 'mousedown',
|
||||
MOUSEUP = 'mouseup',
|
||||
CONTEXTMENU = 'contextmenu',
|
||||
CLICK = 'click',
|
||||
DBL_CLICK = 'dblclick',
|
||||
TOUCHSTART = 'touchstart',
|
||||
@ -28,6 +29,7 @@
|
||||
CONTENT_MOUSEMOVE = 'contentMousemove',
|
||||
CONTENT_MOUSEDOWN = 'contentMousedown',
|
||||
CONTENT_MOUSEUP = 'contentMouseup',
|
||||
CONTENT_CONTEXTMENU = 'contentContextmenu',
|
||||
CONTENT_CLICK = 'contentClick',
|
||||
CONTENT_DBL_CLICK = 'contentDblclick',
|
||||
CONTENT_TOUCHSTART = 'contentTouchstart',
|
||||
@ -44,7 +46,7 @@
|
||||
UNDERSCORE = '_',
|
||||
CONTAINER = 'container',
|
||||
EMPTY_STRING = '',
|
||||
EVENTS = [MOUSEDOWN, MOUSEMOVE, MOUSEUP, MOUSEOUT, TOUCHSTART, TOUCHMOVE, TOUCHEND, MOUSEOVER, DOMMOUSESCROLL, MOUSEWHEEL, WHEEL],
|
||||
EVENTS = [MOUSEDOWN, MOUSEMOVE, MOUSEUP, MOUSEOUT, TOUCHSTART, TOUCHMOVE, TOUCHEND, MOUSEOVER, DOMMOUSESCROLL, MOUSEWHEEL, WHEEL, CONTEXTMENU],
|
||||
|
||||
// cached variables
|
||||
eventsLength = EVENTS.length;
|
||||
@ -553,6 +555,9 @@
|
||||
evt.preventDefault();
|
||||
}
|
||||
},
|
||||
_contextmenu: function(evt) {
|
||||
this._fire(CONTENT_CONTEXTMENU, { evt: evt });
|
||||
},
|
||||
_touchstart: function(evt) {
|
||||
this._setPointerPosition(evt);
|
||||
var shape = this.getIntersection(this.getPointerPosition());
|
||||
|
Loading…
Reference in New Issue
Block a user