Embedded views are fixed sizes when you drag them onto the view canvas. But if you set an embedded view's path to a view that is smaller than the embedded view, the embedded view remains the same, original size.
Is there anyway to autosize an embedded view to the extents of the object that it is displaying? Or is this always going to be a manual operation?
Maybe you're missing the useDefaultViewWidth and useDefaultViewHeight properties? If they are checked, the object view will be made to fit the size of the view as it is defined, otherwise the contents of that view will be sized to fit the embedded view object.
I myself tend to use "auto" position basis and flex layouts instead of fixed pixel sizes and coordinate containers. I'm not sure how a coordinate container acts with regard to those "useDefaultView" properties when used as an embedded view. A coordinate container will resize nicely to fit within an embedded view, but only when set to "percent" mode.
Oh, I misunderstood--you want the embedded view itself to resize to fit the view it's embedding, not the other way 'round. In that case I believe the size of it is determined by its context. If it's inside a flex container, try using a basis of "auto," although that probably adjusts to its surrounding elements as well as taking into account the size of its contents.
...or you could simply set its basis to match the size of the view it is containing, though that will only apply along one axis (row vs. column layout). You can then explicitly set the other axis (width/height) using the style property.
That's one of the reasons I avoid Coordinate Containers--you have to explicitly set element positions and sizes, rather than letting them adjust to the context surrounding them.
In this use case I think a coordinate container makes more sense, as I am replicating physical operator control panels, and want the overall view to look as close as possible to the real system. So no fancy automatic setting of positions and sizes. But I've always had to manually set the embedded view size. I've finally got annoyed enough of doing that. Hence my question.
It maybe that I should be using different style of base view. But that's a different question.
You can set coordinate container to percentage
Or if you keep it fixed you can set the x/y to use "100%"
Or something more advanced with calcs...
There is also "auto" or "fit-content" though those sometimes have issues with svgs