From 036abdc96b32a3f6ea54f26a103c52c6ae576124 Mon Sep 17 00:00:00 2001 From: absidue <48293849+absidue@users.noreply.github.com> Date: Sun, 11 Sep 2022 20:29:27 +0200 Subject: [PATCH] Remove unused ft-intersection-observer component (#2563) --- .../ft-intersection-observer.js | 54 ------------------- .../ft-intersection-observer.vue | 5 -- 2 files changed, 59 deletions(-) delete mode 100644 src/renderer/components/ft-intersection-observer/ft-intersection-observer.js delete mode 100644 src/renderer/components/ft-intersection-observer/ft-intersection-observer.vue diff --git a/src/renderer/components/ft-intersection-observer/ft-intersection-observer.js b/src/renderer/components/ft-intersection-observer/ft-intersection-observer.js deleted file mode 100644 index 80183c66..00000000 --- a/src/renderer/components/ft-intersection-observer/ft-intersection-observer.js +++ /dev/null @@ -1,54 +0,0 @@ -import Vue from 'vue' - -export default Vue.extend({ - name: 'FtIntersectionObserver', - props: { - checkOnMount: { - type: Boolean, - default: false - }, - margin: { - type: String, - default: '0px 0px 0px 0px' - }, - observeParent: { - type: Boolean, - default: false - }, - threshold: { - type: Number, - default: 1 - } - }, - data() { - const observer = new IntersectionObserver(this.handleIntersection, { - rootMargin: this.margin, - threshold: this.threshold - }) - const runOnce = false - - return { - observer, - runOnce - } - }, - mounted() { - this.observer.observe(this.observeParent ? this.$refs.elem.parentElement : this.$refs.elem) - }, - beforeDestroy() { - this.observer.disconnect() - }, - methods: { - handleIntersection(entries) { - if (!this.runOnce) { - this.runOnce = true - - if (!this.checkOnMount) { - return - } - } - - this.$emit(entries[0].isIntersecting ? 'intersected' : 'unintersected') - } - } -}) diff --git a/src/renderer/components/ft-intersection-observer/ft-intersection-observer.vue b/src/renderer/components/ft-intersection-observer/ft-intersection-observer.vue deleted file mode 100644 index bb02f5a0..00000000 --- a/src/renderer/components/ft-intersection-observer/ft-intersection-observer.vue +++ /dev/null @@ -1,5 +0,0 @@ - - -