Skip to content

Commit

Permalink
v5.3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
novykh committed Jul 19, 2024
1 parent feffc81 commit 8fa1ef8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@netdata/charts",
"version": "5.3.9",
"version": "5.3.10",
"description": "Netdata frontend SDK and chart utilities",
"main": "dist/index.js",
"module": "dist/es6/index.js",
Expand Down
4 changes: 2 additions & 2 deletions src/components/helpers/fontSizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const FontSizer = ({
useEffect(() => {
if (!ref) return

const animId = requestAnimationFrame(() => {
const timeoutId = setTimeout(() => {
cancelRef.current = false
let fontSize = maxFontSize

Expand All @@ -34,7 +34,7 @@ const FontSizer = ({

return () => {
cancelRef.current = true
cancelAnimationFrame(animId)
clearTimeout(timeoutId)
}
}, [children, maxHeight, maxWidth, ref])

Expand Down
6 changes: 2 additions & 4 deletions src/sdk/makeChart/makeDataFetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ export default chart => {
chart.consumePayload()
chart.invalidateClosestRowCache()

if (!chart.getAttribute("loaded") && chart.getParent())
chart.getParent().trigger("chartLoaded", chart)
if (!chart.getAttribute("loaded")) chart.getRoot().trigger("chartLoaded", chart)

const attributes = chart.getAttributes()

Expand Down Expand Up @@ -120,8 +119,7 @@ export default chart => {
chart.backoff()
chart.trigger("failFetch", error)

if (!chart.getAttribute("loaded") && chart.getParent())
chart.getParent().trigger("chartLoaded", chart)
if (!chart.getAttribute("loaded")) chart.getRoot().trigger("chartLoaded", chart)

chart.updateAttributes({
loaded: true,
Expand Down

0 comments on commit 8fa1ef8

Please sign in to comment.