Commit 5f58604a authored by christianrhansen's avatar christianrhansen

testings: directive is obsolete at the moment

parent 06a82ae4
Pipeline #17460 passed with stage
in 2 minutes and 19 seconds
export default ({ Vue }) => {
Vue.directive('intersection-observer', {
// bind: function (el, binding, vnode) {
bind: function (el) {
// bind: function (el) {
bind: function (el, binding, vnode) {
console.log('binding', binding.expression)
const options = {
// root: null,
threshold: '0'
......@@ -13,17 +14,21 @@ export default ({ Vue }) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
el.dataset.left = 'xxx'
console.log(entry)
console.log(el.dataset)
console.log('########')
// vnode.context.$emit('onIntersectionChanged')
vnode.context.$emit('onIntersectionChanged')
console.log(vnode)
console.log(binding.expression)
console.log('=======')
// console.log(entry)
// console.log(el.dataset)
// console.log('########')
}
else {
el.dataset.left = entry.boundingClientRect.left
console.log(entry)
console.log(el.dataset)
console.log('--------')
// console.log(entry)
// console.log(el.dataset)
// console.log('--------')
}
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment