Skip to content

artboard-deluxe / clickZoom

clickZoom()

clickZoom(options?): ArtboardPluginDefinition<{ animation: Required<AnimationOptions>; }>

Implements a "click to zoom".

Note this plugin only handles click events originating from mouse pointers. For touch devices, use the doubleTapToZoom plugin.

Parameters

options?

animation

Required<AnimationOptions>

Returns

ArtboardPluginDefinition<{ animation: Required<AnimationOptions>; }>

Example

typescript
import { createArtboard, clickZoom } from 'artboard-deluxe'

const root = document.elementById('root')
const artboard = createArtboard(root, [clickZoom()])

Defined in

plugins/clickZoom/index.ts:20