Commit e4b3d5b5 authored by christianrhansen's avatar christianrhansen

created CellHandlerMobile

parent 2853b20e
<template lang="pug">"targetHandler")
export default {
props: ['element'],
mounted () {
let observer = new IntersectionObserver(this.observerCallback)
observer.observe(this.$refs.targetHandler) = observer
methods: {
observerCallback (entries) {
let target = entries[0]
if (!target.isIntersecting) {
this.$emit('onIntersectionChange', {element: this.element, offset: target.boundingClientRect.left})
else {
this.$emit('onIntersectionChange', {element: this.element, offset: undefined})
name: 'CellHandlerMobile'
<style scoped lang="stylus">
handler-width = 40px
width handler-width
height handler-width
border-radius 1000px
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