summaryrefslogtreecommitdiff
path: root/packages/client/src/directives/sticky-container.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/client/src/directives/sticky-container.ts')
-rw-r--r--packages/client/src/directives/sticky-container.ts17
1 files changed, 0 insertions, 17 deletions
diff --git a/packages/client/src/directives/sticky-container.ts b/packages/client/src/directives/sticky-container.ts
deleted file mode 100644
index 3cf813054b..0000000000
--- a/packages/client/src/directives/sticky-container.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { Directive } from 'vue';
-
-export default {
- mounted(src, binding, vn) {
- //const query = binding.value;
-
- const header = src.children[0];
- const body = src.children[1];
- const currentStickyTop = getComputedStyle(src).getPropertyValue('--stickyTop') || '0px';
- src.style.setProperty('--stickyTop', `calc(${currentStickyTop} + ${header.offsetHeight}px)`);
- if (body) body.dataset.stickyContainerHeaderHeight = header.offsetHeight.toString();
- header.style.setProperty('--stickyTop', currentStickyTop);
- header.style.position = 'sticky';
- header.style.top = 'var(--stickyTop)';
- header.style.zIndex = '1';
- },
-} as Directive;