enrecipes/app/shared/mixins.js

25 lines
679 B
JavaScript
Raw Permalink Normal View History

2021-04-01 10:55:35 +00:00
export const lvMixin = {
methods: {
2021-04-12 18:09:48 +00:00
transparentPage({ object }) {
object._dialogFragment
.getDialog()
.getWindow()
.setBackgroundDrawable(
new android.graphics.drawable.ColorDrawable(
android.graphics.Color.TRANSPARENT
)
)
2021-04-01 10:55:35 +00:00
},
2021-04-12 18:09:48 +00:00
// animateInOut(dur, rev, draw) {
// const start = Date.now()
// let timer = setInterval(() => {
// const passed = Date.now() - start
// let val = passed / dur
// if (val > 1) val = 1
// draw(rev ? 1 - val : val)
// if (val === 1) clearInterval(timer)
// }, 17) // 1000ms/60fps=16.66ms => 17ms
// },
2021-04-01 10:55:35 +00:00
},
}