Register pointer event handlers as disposable

This commit is contained in:
ahocevar
2014-04-01 15:31:39 +02:00
parent e05cff670b
commit a3be9e720a
3 changed files with 12 additions and 5 deletions

View File

@@ -48,7 +48,9 @@ ol.control.FullScreen = function(opt_options) {
' ol-has-tooltip'
});
goog.dom.appendChild(button, tip);
goog.events.listen(new ol.pointer.PointerEventHandler(button),
var buttonHandler = new ol.pointer.PointerEventHandler(button);
this.registerDisposable(buttonHandler);
goog.events.listen(buttonHandler,
ol.pointer.EventType.POINTERUP, this.handleClick_, false, this);
goog.events.listen(button, [