From 0e8c62eb4b3eed3f017245bd573c2d44db56f3de Mon Sep 17 00:00:00 2001 From: Uwe Oestermeier Date: Fri, 12 Jul 2019 14:50:30 +0200 Subject: [PATCH] Minor updates to Doctests. --- dist/iwmlib.js | 15 +++++++++++++++ lib/bundle.js | 3 ++- lib/card/index.html | 6 ++++-- lib/scatter.html | 5 +++-- 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/dist/iwmlib.js b/dist/iwmlib.js index 71bf8fa..4155493 100644 --- a/dist/iwmlib.js +++ b/dist/iwmlib.js @@ -2974,6 +2974,20 @@ /* eslint-disable no-unused-vars */ + /** This interface allows scatters to delegate tap events to other objects. */ + class ITapDelegate extends Interface { + + /** This method must be defined by the delegate. It handles the tap event. */ + tap(event) { + + } + + /** Tells the delegate that it should handle standard click events. */ + handleClicks() { + + } + } + /** * A base class for scatter specific events. * @@ -7737,6 +7751,7 @@ window.IApp = IApp; window.IInteractionMapperTarget = IInteractionMapperTarget; window.IInteractionTarget = IInteractionTarget; + window.ITapDelegate = ITapDelegate; window.Index = Index; window.Inspect = Inspect; window.Interaction = Interaction; diff --git a/lib/bundle.js b/lib/bundle.js index dbbdc35..f7a485c 100755 --- a/lib/bundle.js +++ b/lib/bundle.js @@ -15,7 +15,7 @@ import {EventRecorder} from './events.js' import {FrameContainer, FrameTarget} from './frames.js' import {Inspect} from './inspect.js' import {PointMap, InteractionPoints, Interaction, IInteractionTarget, InteractionDelta, InteractionMapper, InteractionDelegate, IInteractionMapperTarget} from './interaction.js' -import {ResizeEvent, DOMScatterContainer, AbstractScatter, DOMScatter, ScatterEvent, BaseEvent} from './scatter.js' +import {ITapDelegate, ResizeEvent, DOMScatterContainer, AbstractScatter, DOMScatter, ScatterEvent, BaseEvent} from './scatter.js' import {Cycle, Colors, Elements, Angle, Dates, Points, Polygon, Rect, Sets, Strings, isEmpty, getId, lerp, debounce, randomInt, randomFloat, LowPassFilter} from './utils.js' import UITest from './uitest.js' @@ -54,6 +54,7 @@ window.FrameTarget = FrameTarget window.IApp = IApp window.IInteractionMapperTarget = IInteractionMapperTarget window.IInteractionTarget = IInteractionTarget +window.ITapDelegate = ITapDelegate window.Index = Index window.Inspect = Inspect window.Interaction = Interaction diff --git a/lib/card/index.html b/lib/card/index.html index b2b2734..1d28564 100644 --- a/lib/card/index.html +++ b/lib/card/index.html @@ -76,6 +76,8 @@