From 7bb3b696f7c0cfaf863f1337ca194d375a0484ba Mon Sep 17 00:00:00 2001 From: Uwe Oestermeier Date: Fri, 31 Jan 2020 10:26:41 +0100 Subject: [PATCH] Created new build. --- dist/iwmlib.js | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/dist/iwmlib.js b/dist/iwmlib.js index 2da00b7..9ff449b 100644 --- a/dist/iwmlib.js +++ b/dist/iwmlib.js @@ -2633,6 +2633,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 +5746,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 +6170,8 @@ x = bbRight; if (!this.useEventPosWithBoundingBox) y = (bbTop + bbBottom) / 2; break + default: + break } } @@ -6204,6 +6227,8 @@ x += this.notchSize * 2; x += this.posOffset; break + default: + break } this.placeOrigin(x, y); } @@ -8305,6 +8330,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. @@ -9733,6 +9761,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.