Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

zenas-react-icecream-charts

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zenas-react-icecream-charts - npm Package Compare versions

Comparing version 0.10.4 to 0.10.5

21

esm/_chart/hooks.js

@@ -65,6 +65,2 @@ import { useEffect, useImperativeHandle, useLayoutEffect, useRef } from 'react';

});
var debouncedRedrawChart = useRef(debounce(function () {
var _a;
(_a = chartRef.current) === null || _a === void 0 ? void 0 : _a.reflow();
}, 100)).current;
/**

@@ -89,12 +85,17 @@ * highcharts 的 chart.update 不能响应 lang 数据的变化,每次 lang 变化都需要:

useEffect(function () { return function () { var _a; return (_a = chartRef.current) === null || _a === void 0 ? void 0 : _a.destroy(); }; }, []);
useLayoutEffect(function () {
if (renderToRef.current) {
addListener(renderToRef.current, debouncedRedrawChart);
useEffect(function () {
var renderDom = renderToRef.current;
var debouncedReflowChart = debounce(function () {
var _a;
(_a = chartRef.current) === null || _a === void 0 ? void 0 : _a.reflow();
}, 200);
if (renderDom) {
addListener(renderDom, debouncedReflowChart);
}
return function () {
if (renderToRef.current) {
removeListener(renderToRef.current, debouncedRedrawChart);
if (renderDom) {
removeListener(renderDom, debouncedReflowChart);
}
};
}, [debouncedRedrawChart]);
}, []);
return [renderToRef, createChartRef];

@@ -101,0 +102,0 @@ }

@@ -90,6 +90,2 @@ "use strict";

});
var debouncedRedrawChart = react_1.useRef(lodash_1.debounce(function () {
var _a;
(_a = chartRef.current) === null || _a === void 0 ? void 0 : _a.reflow();
}, 100)).current;
/**

@@ -114,12 +110,17 @@ * highcharts 的 chart.update 不能响应 lang 数据的变化,每次 lang 变化都需要:

react_1.useEffect(function () { return function () { var _a; return (_a = chartRef.current) === null || _a === void 0 ? void 0 : _a.destroy(); }; }, []);
react_1.useLayoutEffect(function () {
if (renderToRef.current) {
resize_detector_1.addListener(renderToRef.current, debouncedRedrawChart);
react_1.useEffect(function () {
var renderDom = renderToRef.current;
var debouncedReflowChart = lodash_1.debounce(function () {
var _a;
(_a = chartRef.current) === null || _a === void 0 ? void 0 : _a.reflow();
}, 200);
if (renderDom) {
resize_detector_1.addListener(renderDom, debouncedReflowChart);
}
return function () {
if (renderToRef.current) {
resize_detector_1.removeListener(renderToRef.current, debouncedRedrawChart);
if (renderDom) {
resize_detector_1.removeListener(renderDom, debouncedReflowChart);
}
};
}, [debouncedRedrawChart]);
}, []);
return [renderToRef, createChartRef];

@@ -126,0 +127,0 @@ }

{
"name": "zenas-react-icecream-charts",
"version": "0.10.4",
"version": "0.10.5",
"license": "MIT",

@@ -5,0 +5,0 @@ "main": "esm/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc