0.17.1 • Published 2 months ago

@zimi/interact v0.17.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

@zimi/interact

用户交互(move / scale / rotate) 和 交互方式(mouse / touch)的抽象

install

yarn add @zimi/interact

examples

import { MouseFormatter, TouchFormatter } from '@zimi/interact'

// --- mouse ---

const mouseFormatter = new MouseFormatter()

mouseFormatter.attach(element)

mouseFormatter.addListener('move', (...args) => {
  // do sth
})
mouseFormatter.addListener('scale', (...args) => {
  // do sth
})
mouseFormatter.addListener('rotate', (...args) => {
  // do sth
})

// --- touch ---

const touchFormatter = new TouchFormatter()

touchFormatter.attach(element)

touchFormatter.addListener('move', (...args) => {
  // do sth
})
touchFormatter.addListener('scale', (...args) => {
  // do sth
})
touchFormatter.addListener('rotate', (...args) => {
  // do sth
})
0.17.1

2 months ago

0.17.0

5 months ago

0.15.0

1 year ago

0.16.0

1 year ago

0.11.0

1 year ago

0.9.0

1 year ago

0.12.0

1 year ago

0.13.0

1 year ago

0.9.1

1 year ago

0.8.0

1 year ago

0.7.0

1 year ago

0.6.0

1 year ago

0.5.0

1 year ago

0.4.0

1 year ago

0.3.1

1 year ago

0.3.0

1 year ago

0.2.0

1 year ago

0.1.16

1 year ago

0.1.10

1 year ago

0.1.9

2 years ago