@sveltejs/svelte-scroller
Advanced tools
Comparing version 1.0.3 to 1.0.4
# svelte-scroller changelog | ||
## 1.0.4 | ||
* Remove instance from scroll manager on destroy | ||
* Abort scroll handler if viewport is offscreen in browsers without IntersectionObserver | ||
## 1.0.3 | ||
@@ -4,0 +9,0 @@ |
@@ -270,2 +270,6 @@ (function (global, factory) { | ||
// only update while the foreground is visible | ||
// (only affects browsers without IntersectionObserver) | ||
if (foreground.top > window.innerHeight || foreground.bottom < 0) return; | ||
const foreground_height = foreground.bottom - foreground.top; | ||
@@ -356,2 +360,5 @@ const background_height = background.bottom - background.top; | ||
} | ||
function ondestroy() { | ||
manager.remove(this); | ||
} | ||
function add_css() { | ||
@@ -453,2 +460,4 @@ var style = createElement("style"); | ||
this._handlers.destroy = [ondestroy]; | ||
this._slotted = options.slots || {}; | ||
@@ -455,0 +464,0 @@ |
{ | ||
"name": "@sveltejs/svelte-scroller", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "A <Scroller> component for Svelte apps", | ||
@@ -10,4 +10,5 @@ "svelte": "src/Scroller.html", | ||
"build": "rollup -c", | ||
"dev": "rollup -cw", | ||
"prepublishOnly": "npm test", | ||
"test": "node test/runner.js", | ||
"test": "node index.js && node test/runner.js", | ||
"test:browser": "npm run build && serve test/public", | ||
@@ -14,0 +15,0 @@ "pretest": "npm run build" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36924
808