From 9db57237468beccc24ccf1e09a97050ac24011cb Mon Sep 17 00:00:00 2001 From: Uwe Oestermeier Date: Mon, 17 Feb 2020 16:20:16 +0100 Subject: [PATCH] Updated dist --- dist/iwmlib.js | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/dist/iwmlib.js b/dist/iwmlib.js index 6acd4a1..ce7f74c 100644 --- a/dist/iwmlib.js +++ b/dist/iwmlib.js @@ -614,6 +614,19 @@ static toLine(event) { return `${event.type} #${event.target.id} ${event.clientX} ${event.clientY}` + let result = event.type; + let selector = this.selector(event.target); + result += ' selector: ' + selector; + if (event.target != document.querySelector(selector)) console.log('Cannot resolve', selector); + let keys = ['layerX', 'layerY', 'pageX', 'pageY', 'clientX', 'clientY']; + for (let key of keys) { + try { + result += ' ' + key + ':' + event[key]; + } catch (e) { + console.log('Invalid key: ' + key); + } + } + return result } static compareExtractedWithSimulated() { @@ -2633,6 +2646,25 @@ result[id] = this.getPosition(event); break } + // case 'TouchEvent': + // // Needs to be observed: Perhaps changedTouches are all we need. If so + // // we can remove the touchEventKey default parameter + // if (touchEventKey == 'all') { + // for(let t of event.targetTouches) { + // result[t.identifier.toString()] = this.getPosition(t) + // } + // for(let t of event.changedTouches) { + // result[t.identifier.toString()] = this.getPosition(t) + // } + // } + // else { + // for(let t of event.changedTouches) { + // result[t.identifier.toString()] = this.getPosition(t) + // } + // } + // break + default: + break } return result } @@ -5727,6 +5759,8 @@ let bottom = parseFloat(this.element.style.bottom); this.element.style.bottom = bottom - delta.y + 'px'; break + default: + break } //console.log("onResize", this.onResize) if (this.onResize) { @@ -6149,6 +6183,8 @@ x = bbRight; if (!this.useEventPosWithBoundingBox) y = (bbTop + bbBottom) / 2; break + default: + break } } @@ -6204,6 +6240,8 @@ x += this.notchSize * 2; x += this.posOffset; break + default: + break } this.placeOrigin(x, y); } @@ -8308,6 +8346,9 @@ Highlight.expandedClass = 'expanded'; + // TODO: @ue Is this constant necessary? + const enableNearestNeighborTaps = false; + /** * A class that collects static methods to maintain the states and parts of * EyeVisit like cards. @@ -9736,6 +9777,16 @@ article.appendChild(iconClone); } + if (enableNearestNeighborTaps) { + //look for nearby popups on tap + InteractionMapper.on('tap', indexbox, () => { + // console.log('Tap handler called', editable) + if (!editable) { + this.findNearbyPopups(event, card); + } + }); + } + const eventElements = [indexbox, iconClone, clone]; // Use the 'tap' event for closing.