Cast 'originalEvent' in interactions

This commit is contained in:
Frederic Junod
2018-09-05 13:59:12 +02:00
parent f825a08bcf
commit a5f5c06af3
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -77,7 +77,7 @@ function handleEvent(mapBrowserEvent) {
let stopEvent = false;
if (mapBrowserEvent.type == EventType.KEYDOWN ||
mapBrowserEvent.type == EventType.KEYPRESS) {
const keyEvent = mapBrowserEvent.originalEvent;
const keyEvent = /** @type {KeyboardEvent} */ (mapBrowserEvent.originalEvent);
const charCode = keyEvent.charCode;
if (this.condition_(mapBrowserEvent) &&
(charCode == '+'.charCodeAt(0) || charCode == '-'.charCodeAt(0))) {