Added support for DOM cards.

This commit is contained in:
2019-07-12 14:33:15 +02:00
parent d04f92ee7f
commit e1b5c45b52
10 changed files with 941 additions and 386 deletions
+5 -4
View File
@@ -89,8 +89,8 @@ to simulate click events by using taps. If the scatter detects a tap it looks fo
elements under or nearby the event position and calls the click handler. Thus gestures
can be disambiguated as moves, zooms. or taps.
Note that on touch devices you can tap beside the object if you use clickOnTap. The allowed distance
can be configured by allowClickDistance. The default value is 44px.
Note that on touch devices you can tap beside the object if you use an object that implements the ITapDelegate interface.
An ITapDelegate allowes a distance that can be configured by allowClickDistance. The default value is 44px.
</p>
<div id="contentExample" class="grayBorder interactive" style="position: relative; width: 100%; height: 280px;">
@@ -110,14 +110,15 @@ can be configured by allowClickDistance. The default value is 44px.
<script class="doctest">
let contentContainer = new DOMScatterContainer(contentExample)
let tapDelegate = new CardWrapper(interactiveContent)
new DOMScatter(interactiveContent, contentContainer, {
x: 44,
y: 44,
width: 274,
height: 184,
clickOnTap: true,
tapDelegate,
throwVisibility: 88,
triggerSVGClicks: true,
minScale: 0.5,
maxScale: 1.5})