@zambezi/d3-utils
Advanced tools
Comparing version 3.3.1 to 3.4.0-unsubscribe-on-destroy.1
@@ -134,2 +134,5 @@ (function (global, factory) { | ||
function resize(s) { | ||
s.on('destroy.resize', function () { | ||
return w.on(type, null); | ||
}); | ||
w.on(type, underscore.debounce(onWindowResize, wait)); | ||
@@ -136,0 +139,0 @@ |
@@ -6,2 +6,5 @@ ## resize | ||
The component works by attaching a `resize` event on `document.window`. | ||
If a `destroy` event is dispatched on the selection this component is called on, the component will deactivate by unsubscribing from the `resize` event. | ||
This can be used in conjunction with [redraw](./redraw.md) | ||
@@ -8,0 +11,0 @@ |
{ | ||
"name": "@zambezi/d3-utils", | ||
"version": "3.3.1", | ||
"version": "3.4.0-unsubscribe-on-destroy.1", | ||
"description": "Common utility functions to use with d3", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -12,2 +12,3 @@ import { rest } from 'underscore' | ||
function resize(s) { | ||
s.on('destroy.resize', () => w.on(type, null)) | ||
w.on(type, debounce(onWindowResize, wait)) | ||
@@ -14,0 +15,0 @@ |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
62921
643
1