本文整理汇总了TypeScript中zanimo类的典型用法代码示例。如果您正苦于以下问题:TypeScript zanimo类的具体用法?TypeScript zanimo怎么用?TypeScript zanimo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了zanimo类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: close
export function close(fromBB?: string) {
if (fromBB !== 'backbutton' && isOpen()) router.backbutton.stack.pop()
profileMenuOpen(false)
isOpen(false)
clearTimeout(pingsTimeoutID)
if (hasNetwork()) {
socket.send('moveLat', false)
}
const el = document.getElementById('side_menu')
const bd = document.getElementById('menu-close-overlay')
return Promise.all([
Zanimo(bd, 'opacity', 0, 250, 'linear'),
Zanimo(
el,
'transform',
'translate3d(-100%,0,0)', 250, 'ease-out'
)
])
.then(() =>
Promise.all([
Zanimo(el, 'visibility', 'hidden', 0),
Zanimo(bd, 'visibility', 'hidden', 0)
])
)
.catch(console.log.bind(console))
}
示例2: function
return function(e: Event) {
e.stopPropagation()
const el = selector ? findParentBySelector((e.target as HTMLElement), selector) : e.target
return Zanimo(el, 'opacity', 0, time)
.then(() => utils.autoredraw(callback))
.catch(console.log.bind(console))
}
示例3: slidesInLeft
export function slidesInLeft(vnode: Mithril.DOMNode): Promise<HTMLElement> {
const el = vnode.dom as HTMLElement
el.style.transform = 'translateX(100%)'
// force reflow hack
vnode.state.lol = el.offsetHeight
return Zanimo(el, 'transform', 'translateX(0)', 250, 'ease-out')
.catch(console.log.bind(console))
}
示例4: open
export function open() {
isOpen(true)
router.backbutton.stack.push(close)
if (hasNetwork()) {
socket.send('moveLat', true)
}
pingsTimeoutID = setTimeout(getServerLags, 1000)
const el = document.getElementById('side_menu')
const bd = document.getElementById('menu-close-overlay')
return Promise.all([
Zanimo(bd, 'visibility', 'visible', 0),
Zanimo(bd, 'opacity', 0.5, 250, 'linear'),
Zanimo(el, 'visibility', 'visible', 0),
Zanimo(
el,
'transform',
'translate3d(0,0,0)', 250, 'ease-out'
)
])
.then(redraw)
.catch(console.log.bind(console))
}
示例5: Zanimo
.then(() =>
Promise.all([
Zanimo(el, 'visibility', 'hidden', 0),
Zanimo(bd, 'visibility', 'hidden', 0)
])
示例6: elFadeOut
export function elFadeOut(el: HTMLElement) {
return Zanimo(el, 'opacity', 0, 250, 'ease-out')
}