copy properties for pointer event from internal browser event, not from google.event.BrowserEvent

This commit is contained in:
tsauerwein
2014-02-07 09:37:41 +01:00
parent 1c75ecc260
commit ee2174785f
3 changed files with 3 additions and 3 deletions

View File

@@ -113,7 +113,7 @@ ol.pointer.MouseSource.prototype.isEventSimulatedFromTouch_ =
* @return {Object}
*/
ol.pointer.MouseSource.prototype.prepareEvent_ = function(inEvent) {
var e = this.dispatcher.cloneEvent(inEvent);
var e = this.dispatcher.cloneEvent(inEvent.getBrowserEvent());
// forward mouse preventDefault
var pd = e.preventDefault;

View File

@@ -111,7 +111,7 @@ ol.pointer.MsSource.prototype.hasBitmapType = function() {
ol.pointer.MsSource.prototype.prepareEvent_ = function(inEvent) {
var e = inEvent;
if (this.HAS_BITMAP_TYPE) {
e = this.dispatcher.cloneEvent(inEvent);
e = this.dispatcher.cloneEvent(inEvent.getBrowserEvent());
e.pointerType = this.POINTER_TYPES[inEvent.pointerType];
}

View File

@@ -260,7 +260,7 @@ ol.pointer.PointerEventHandler.prototype.removeEvents_ = function(events) {
/**
* Returns a snapshot of inEvent, with writable properties.
*
* @param {goog.events.BrowserEvent|Touch} inEvent An event that contains
* @param {Event|Touch} inEvent An event that contains
* properties to copy.
* @return {Object} An object containing shallow copies of
* `inEvent`'s properties.