mirror of
https://github.com/konvajs/konva.git
synced 2026-01-22 03:11:53 +08:00
Merge branch 'master' of github.com:vmichnowicz/KineticJS into vmichnowicz-master
Conflicts: src/Layer.js
This commit is contained in:
@@ -166,6 +166,7 @@
|
||||
}
|
||||
|
||||
Kinetic.Container.prototype.drawHit.call(this, canvas, top);
|
||||
this.imageData = null; // Clear imageData cache
|
||||
return this;
|
||||
},
|
||||
/**
|
||||
|
||||
19
src/Stage.js
19
src/Stage.js
@@ -19,6 +19,9 @@
|
||||
TAP = 'tap',
|
||||
DBL_TAP = 'dbltap',
|
||||
TOUCHMOVE = 'touchmove',
|
||||
DOMMOUSESCROLL = 'DOMMouseScroll',
|
||||
MOUSEWHEEL = 'mousewheel',
|
||||
WHEEL = 'wheel',
|
||||
|
||||
CONTENT_MOUSEOUT = 'contentMouseout',
|
||||
CONTENT_MOUSEOVER = 'contentMouseover',
|
||||
@@ -40,7 +43,7 @@
|
||||
UNDERSCORE = '_',
|
||||
CONTAINER = 'container',
|
||||
EMPTY_STRING = '',
|
||||
EVENTS = [MOUSEDOWN, MOUSEMOVE, MOUSEUP, MOUSEOUT, TOUCHSTART, TOUCHMOVE, TOUCHEND, MOUSEOVER],
|
||||
EVENTS = [MOUSEDOWN, MOUSEMOVE, MOUSEUP, MOUSEOUT, TOUCHSTART, TOUCHMOVE, TOUCHEND, MOUSEOVER, DOMMOUSESCROLL, MOUSEWHEEL, WHEEL],
|
||||
|
||||
// cached variables
|
||||
eventsLength = EVENTS.length;
|
||||
@@ -609,6 +612,20 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
_DOMMouseScroll: function(evt) {
|
||||
this._mousewheel(evt);
|
||||
},
|
||||
_mousewheel: function(evt) {
|
||||
this._setPointerPosition(evt);
|
||||
var shape = this.getIntersection(this.getPointerPosition());
|
||||
|
||||
if (shape && shape.isListening()) {
|
||||
shape._fireAndBubble(MOUSEWHEEL, {evt: evt});
|
||||
}
|
||||
},
|
||||
_wheel: function(evt) {
|
||||
this._mousewheel(evt);
|
||||
},
|
||||
_setPointerPosition: function(evt) {
|
||||
var contentPosition = this._getContentPosition(),
|
||||
offsetX = evt.offsetX,
|
||||
|
||||
Reference in New Issue
Block a user