Added flag to enable tap clicks for SVG in tested circumstances.

This commit is contained in:
2019-07-05 16:29:50 +02:00
parent f68d8b53a3
commit d0c89a78c2
4 changed files with 39 additions and 21 deletions
+6 -3
View File
@@ -80,9 +80,6 @@ for(let key of ['women', 'king']) {
app.run()
animatePolygons()
</script>
<h1>
Interactive Content
</h1>
@@ -102,6 +99,11 @@ can be configured by allowClickDistance. The default value is 44px.
<img draggable="false" style="position: absolute;" src="examples/women.jpeg" />
<a style="position:absolute; top: 10px; right: 10px; color:white;" href="javascript:alert('test link')">A Link</a>
<div onclick="alert('div clicked')" style="position:absolute; top: 30px; right: 10px; color:white;">A Div with click handler</div>
<svg onclick="alert('svg clicked')" style="position: absolute; right: 0px; bottom: 0px; width: 32px; height: 32px;" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">
<circle cx="50" cy="50" r="44" stroke="white" stroke-width="8" fill="gray" />
<circle cx="50" cy="32" r="7" fill="white" />
<line x1="50" y1="46" x2="50" y2="78" stroke="white" stroke-width="12" />
</svg>
</div>
</div>
@@ -115,6 +117,7 @@ can be configured by allowClickDistance. The default value is 44px.
height: 184,
clickOnTap: true,
throwVisibility: 88,
triggerSVGClicks: true,
minScale: 0.5,
maxScale: 1.5})