aboutsummaryrefslogtreecommitdiff
path: root/js/src/dom
diff options
context:
space:
mode:
authorGeoSot <[email protected]>2022-04-13 20:29:13 +0300
committerGitHub <[email protected]>2022-04-13 10:29:13 -0700
commitece16012270a9ef7781ce9269cb151c5e5961734 (patch)
tree2c0a639899c08835b58ab805d21149ccb45c1ca8 /js/src/dom
parentcfd2f3f7787ba22feb78d916956f6f73746f3ee3 (diff)
downloadbootstrap-ece16012270a9ef7781ce9269cb151c5e5961734.tar.xz
bootstrap-ece16012270a9ef7781ce9269cb151c5e5961734.zip
Revamp Scrollspy using Intersection observer (#33421)
* Revamp scrollspy to use IntersectionObserver * Add smooth scroll support * Update scrollspy.js/md * move functionality to method * Update scrollspy.js * Add SmoothScroll to docs example * Refactor Using `Maps` and smaller methods * Update scrollspy.md/js * Update scrollspy.spec.js * Support backwards compatibility * minor optimizations * Merge activation functionality * Update scrollspy.md * Update scrollspy.js * Rewording some of the documentation changes * Update scrollspy.js * Update scrollspy.md * tweaking calculation functionality & drop text that suggests, to deactivate target when wrapper is not visible * tweak calculation * Fix lint * Support scrollspy in body & tests * change doc example to a more valid solution Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Patrick H. Lauke <[email protected]>
Diffstat (limited to 'js/src/dom')
-rw-r--r--js/src/dom/manipulator.js16
1 files changed, 0 insertions, 16 deletions
diff --git a/js/src/dom/manipulator.js b/js/src/dom/manipulator.js
index e3ee293c7..5e6ad92ae 100644
--- a/js/src/dom/manipulator.js
+++ b/js/src/dom/manipulator.js
@@ -57,22 +57,6 @@ const Manipulator = {
getDataAttribute(element, key) {
return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`))
- },
-
- offset(element) {
- const rect = element.getBoundingClientRect()
-
- return {
- top: rect.top + window.pageYOffset,
- left: rect.left + window.pageXOffset
- }
- },
-
- position(element) {
- return {
- top: element.offsetTop,
- left: element.offsetLeft
- }
}
}