reaviz / reaflow

🎯 React library for building workflow editors, flow charts and diagrams. Maintained by @goodcodeus.
https://reaflow.dev
Apache License 2.0
2.11k stars 122 forks source link

Icons overflowing Node conainter #250

Open flyrobot27 opened 6 months ago

flyrobot27 commented 6 months ago

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Current behavior

When a (Larger) icon is set, it overflows the node container: image

Expected behavior

The icon should fit within the container image

This image is generated by modifying the "transform" html property of the icon.

Minimal reproduction of the problem with instructions

Create nodes, add an icon, and set the icon dimension to 60 x 60.

What is the motivation / use case for changing the behavior?

better presentation

Environment



Libs:
- react version: 18.2.0
- reaflow version: 5.2.11

Browser:
- [x] Chrome (desktop) version 124.0.6367.60
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [x] Firefox version 125.0.1
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX

For Tooling issues:
npm version is 10.2.4
node version is 18.19.1

Others:
Browser is on Windows 11
Server is on Ubuntu 22.04 LTS