Add map tests for resize and animationDelay

This commit is contained in:
Andreas Hocevar
2016-02-01 16:12:25 +01:00
parent 73f5e11039
commit dc0393acff
2 changed files with 39 additions and 2 deletions

View File

@@ -291,7 +291,7 @@ ol.Map = function(options) {
ol.events.EventType.TOUCHSTART,
ol.events.EventType.MSPOINTERDOWN,
ol.MapBrowserEvent.EventType.POINTERDOWN,
goog.userAgent.GECKO ? 'DOMMouseScroll' : 'mousewheel'
goog.userAgent.GECKO ? 'DOMMouseScroll' : ol.events.EventType.MOUSEWHEEL
], ol.events.Event.stopPropagation);
this.viewport_.appendChild(this.overlayContainerStopEvent_);
@@ -578,6 +578,11 @@ ol.Map.prototype.disposeInternal = function() {
if (this.handleResize_ !== undefined) {
goog.global.removeEventListener(ol.events.EventType.RESIZE,
this.handleResize_, false);
this.handleResize_ = undefined;
}
if (this.animationDelayKey_) {
goog.global.cancelAnimationFrame(this.animationDelayKey_);
this.animationDelayKey_ = undefined;
}
goog.dom.removeNode(this.viewport_);
goog.base(this, 'disposeInternal');