0.17.3 • Published 8 months ago

@zimi/interact v0.17.3

Weekly downloads
-
License
MIT
Repository
github
Last release
8 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.2

8 months ago

0.17.3

8 months ago

0.17.1

1 year ago

0.17.0

2 years ago

0.15.0

2 years ago

0.16.0

2 years ago

0.11.0

2 years ago

0.9.0

2 years ago

0.12.0

2 years ago

0.13.0

2 years ago

0.9.1

2 years ago

0.8.0

2 years ago

0.7.0

2 years ago

0.6.0

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.16

2 years ago

0.1.10

3 years ago

0.1.9

3 years ago