Merge branch 'master' of github.com:vmichnowicz/KineticJS into vmichnowicz-master

Conflicts:
	src/Layer.js
This commit is contained in:
Лаврёнов Антон
2014-08-24 11:05:36 +08:00
2 changed files with 19 additions and 1 deletions

View File

@@ -166,6 +166,7 @@
}
Kinetic.Container.prototype.drawHit.call(this, canvas, top);
this.imageData = null; // Clear imageData cache
return this;
},
/**

View File

@@ -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,