From f007a795ac51af72b258ccebe6e4e12fa7f02668 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Mon, 17 Feb 2020 11:48:14 +0200 Subject: [PATCH] remove unused popover target from portal experiment --- src/components/popover/popover.js | 2 +- src/components/popover/popover_target.js | 23 --------------------- src/components/popover/popover_target.vue | 25 ----------------------- 3 files changed, 1 insertion(+), 49 deletions(-) delete mode 100644 src/components/popover/popover_target.js delete mode 100644 src/components/popover/popover_target.vue diff --git a/src/components/popover/popover.js b/src/components/popover/popover.js index 5b07b261..3732c42e 100644 --- a/src/components/popover/popover.js +++ b/src/components/popover/popover.js @@ -82,7 +82,7 @@ const Popover = { : yOffset + yOffset const xOffset = (this.offset && this.offset.x) || 0 - const translateX = (+anchorEl.offsetWidth * 0.5) - content.offsetWidth * 0.5 + horizOffset + xOffset + const translateX = (anchorEl.offsetWidth * 0.5) - content.offsetWidth * 0.5 + horizOffset + xOffset this.styles = { opacity: 1, diff --git a/src/components/popover/popover_target.js b/src/components/popover/popover_target.js deleted file mode 100644 index 60bed5c7..00000000 --- a/src/components/popover/popover_target.js +++ /dev/null @@ -1,23 +0,0 @@ -const PopoverTarget = { - name: 'PopoverTarget', - computed: { - ids () { - const popovers = this.$store.state.popover.popovers - return Object.keys(popovers) - }, - styles () { - return this.ids.reduce((acc, id) => { - const el = this.$store.state.popover.popovers[id] - const box = el.getBoundingClientRect() - acc[id] = { - top: `${box.y}px`, - left: `${box.x}px` - } - console.log(acc) - return acc - }, {}) - } - } -} - -export default PopoverTarget diff --git a/src/components/popover/popover_target.vue b/src/components/popover/popover_target.vue deleted file mode 100644 index f012823c..00000000 --- a/src/components/popover/popover_target.vue +++ /dev/null @@ -1,25 +0,0 @@ - -