copy properties for pointer event from internal browser event, not from google.event.BrowserEvent
This commit is contained in:
@@ -113,7 +113,7 @@ ol.pointer.MouseSource.prototype.isEventSimulatedFromTouch_ =
|
|||||||
* @return {Object}
|
* @return {Object}
|
||||||
*/
|
*/
|
||||||
ol.pointer.MouseSource.prototype.prepareEvent_ = function(inEvent) {
|
ol.pointer.MouseSource.prototype.prepareEvent_ = function(inEvent) {
|
||||||
var e = this.dispatcher.cloneEvent(inEvent);
|
var e = this.dispatcher.cloneEvent(inEvent.getBrowserEvent());
|
||||||
|
|
||||||
// forward mouse preventDefault
|
// forward mouse preventDefault
|
||||||
var pd = e.preventDefault;
|
var pd = e.preventDefault;
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ ol.pointer.MsSource.prototype.hasBitmapType = function() {
|
|||||||
ol.pointer.MsSource.prototype.prepareEvent_ = function(inEvent) {
|
ol.pointer.MsSource.prototype.prepareEvent_ = function(inEvent) {
|
||||||
var e = inEvent;
|
var e = inEvent;
|
||||||
if (this.HAS_BITMAP_TYPE) {
|
if (this.HAS_BITMAP_TYPE) {
|
||||||
e = this.dispatcher.cloneEvent(inEvent);
|
e = this.dispatcher.cloneEvent(inEvent.getBrowserEvent());
|
||||||
e.pointerType = this.POINTER_TYPES[inEvent.pointerType];
|
e.pointerType = this.POINTER_TYPES[inEvent.pointerType];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ ol.pointer.PointerEventHandler.prototype.removeEvents_ = function(events) {
|
|||||||
/**
|
/**
|
||||||
* Returns a snapshot of inEvent, with writable properties.
|
* 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.
|
* properties to copy.
|
||||||
* @return {Object} An object containing shallow copies of
|
* @return {Object} An object containing shallow copies of
|
||||||
* `inEvent`'s properties.
|
* `inEvent`'s properties.
|
||||||
|
|||||||
Reference in New Issue
Block a user