From 44a5b3385c9a5d28eed82ce1c0419e5d328454e5 Mon Sep 17 00:00:00 2001 From: Sebastian Kupke Date: Mon, 8 Jul 2019 15:44:06 +0200 Subject: [PATCH] Fixed #17. --- dist/iwmlib.js | 6 +++--- dist/iwmlib.pixi.js | 10 +++------- lib/uitest.js | 4 ++-- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/dist/iwmlib.js b/dist/iwmlib.js index 834d2f2..eba57b3 100644 --- a/dist/iwmlib.js +++ b/dist/iwmlib.js @@ -5459,7 +5459,7 @@ */ if (nearestNode.tagName == 'svg') { let handler = this.tapNodes.get(nearestNode); - console.log("Clicking beneath SVG: to be done", handler); + console.log("Clicking near SVG: to be done", handler); if (this.triggerSVGClicks) nearestNode.dispatchEvent(new Event('click')); return @@ -7477,8 +7477,8 @@ // MouseEvent const mouseEventOpts = { - screenX: window.screenX + target.offsetLeft + position.x, - screenY: window.screenY + target.offsetTop + position.y, + screenX: window.screenX + (target.offsetLeft || 0) + position.x, + screenY: window.screenY + (target.offsetTop || 0) + position.y, clientX: rect.x + position.x, clientY: rect.y + position.y, ctrlKey: false, diff --git a/dist/iwmlib.pixi.js b/dist/iwmlib.pixi.js index 793cf4c..4a966b9 100644 --- a/dist/iwmlib.pixi.js +++ b/dist/iwmlib.pixi.js @@ -6053,10 +6053,6 @@ window.Capabilities = Capabilities; window.CapabilitiesTests = CapabilitiesTests; - /** Basic class for poppable elements that need to be closed as soon as one poppable is - * shown. - */ - /* eslint-disable no-unused-vars */ /** * A base class for scatter specific events. @@ -7224,7 +7220,7 @@ */ if (nearestNode.tagName == 'svg') { let handler = this.tapNodes.get(nearestNode); - console.log("Clicking beneath SVG: to be done", handler); + console.log("Clicking near SVG: to be done", handler); if (this.triggerSVGClicks) nearestNode.dispatchEvent(new Event('click')); return @@ -14867,7 +14863,7 @@ * @extends Popup * @see {@link https://www.iwm-tuebingen.de/iwmbrowser/lib/pixi/popupmenu.html|DocTest} */ - class PopupMenu$1 extends Popup { + class PopupMenu extends Popup { /** * Creates an instance of a PopupMenu. @@ -15516,7 +15512,7 @@ window.Stylus = Stylus; window.Switch = Switch; window.Popup = Popup; - window.PopupMenu = PopupMenu$1; + window.PopupMenu = PopupMenu; window.Modal = Modal; window.Volatile = Volatile; window.Message = Message; diff --git a/lib/uitest.js b/lib/uitest.js index d40b010..342ab7e 100644 --- a/lib/uitest.js +++ b/lib/uitest.js @@ -915,8 +915,8 @@ class Event { // MouseEvent const mouseEventOpts = { - screenX: window.screenX + target.offsetLeft + position.x, - screenY: window.screenY + target.offsetTop + position.y, + screenX: window.screenX + (target.offsetLeft || 0) + position.x, + screenY: window.screenY + (target.offsetTop || 0) + position.y, clientX: rect.x + position.x, clientY: rect.y + position.y, ctrlKey: false,