Warning: `NaN` is an invalid value for the `top` css style property.
See original GitHub issueHi there,
I’m getting the following error after adding the first node to the diagram, and proceeding to select it:
Warning: 'NaN' is an invalid value for the 'top' css style property. in div in NodeWidget in div in NodeLayerWidget in div
After inspecting the HTML element in my browser, I can see that the “top” CSS property is not being set for the first node added to the diagram, as it is for subsequent nodes that I add to the diagram:
<div class="node srd-node srd-node--selected " data-nodeid="5070b2af-7155-4072-8738-61d3dbc9b2b0">
I am also unable to move the first node around.
I couldn’t find a bug in my own code that could be causing this, so I wanted to see if this is an issue anyone else has encountered before?
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Warning: NaN is an invalid value for the left css style property ...
Test passes ok but generates following error. Warning: `NaN` is an invalid value for the `left` css style property. in div (created by...
Read more >`NaN` is an invalid value for the `background` css style ...
I changed the value of the background property to a string literal and that fixed the issue. enter={{ background: `${stripe.background}`, }}.
Read more >`NaN` is an invalid value for the `width` css style property - Web
Everytime I join a meeting, I always get this error in the console, though I can successfully join a meeting, it just bothers...
Read more >Warning: `NaN` is an invalid value for the `height` css style ...
I'm getting the following warnings in a Jest test: console.error node_modules/fbjs/lib/warning.js:33 Warning: `NaN` is an invalid value for ...
Read more >React DOM element's style property name or value should not ...
React Warning: NaN is an invalid value for the fontSize css style property. Was this documentation helpful? Analyze Your GitHub Project Now.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can you explain what was the bug? I have same error
Check your model’s options types. In my case, I set
model.setGridSize('15px')
butgridSize
should be a number and this method returnedNaN
. https://github.com/projectstorm/react-diagrams/blob/3060496db0709c37202bca948031cd02ebcc73a7/packages/react-canvas-core/src/entities/canvas/CanvasModel.ts#L99-L104