Closed oddjobz closed 1 year ago
What is the need to disable resizing if you can just put the editor container into the additional parent?
The 'resize' event in rete explicitly tries to set it's size based on it's parent. When the parent is set to "100%", this doesn't work. Allowing Rete to have it's size dictated by it's parent (by setting Rete's size to 100%) works great, so long as the resize event doesn't interfere. (so my solution has been simply to comment out the resize event handler)
i.e. by having a resize handler that explicitly sets rete's size, you remove the possibility for the programmer to set the style of the rete object to a specific size.
When the parent is set to "100%", this doesn't work.
It looks like the size of your container's parent element doesn't have a specific size, but it should
If you're working with responsive layouts, typically one could expect the parent element to have a w/h=100%. I'm unsure "exactly" how this works, but my observations in this instance are that clientWidth/height are not being derived correctly by lines 99/100, whereas omitting lines 99/100 renders perfectly.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.
As things stand, "resize()" explicitly sets the size of the Rete work area based on the container's width and height. Where the container has a "width:100%;height:100%", for example in a flexbox type scenario, this resize mechanism breaks Rete's ability to resize properly in conjunction with other components.
In such instances, Rete does not need to do anything to resize, so disabling the resize() method actually fixes flow and resizing issues. Whereas I appreciate some applications may not embed within a responsive container, it seems like a common requirement. Could we possibly add an option to disable the 'resize' method?