本文整理匯總了TypeScript中zanimo.default方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript zanimo.default方法的具體用法?TypeScript zanimo.default怎麽用?TypeScript zanimo.default使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類zanimo
的用法示例。
在下文中一共展示了zanimo.default方法的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')
}