VtkRemoteView layout distortion #853
-
|
Hi, The problem is that all views appear distorted for a brief moment (about half a second) when their width changes. View2 is only distorted the first time the layout is toggled, while afterwards only view1 shows this temporary distortion. The distortion happens immediately after the style update, even though the render windows themselves are not recreated. I’ve also tried using different events for InvokeEvent(), because I noticed that after clicking in the view it automatically rerenders. I also checked camera resets and render calls, but the temporary distortion still occurs. I’m looking for a proper way to update the views so they maintain correct aspect ratio when the layout changes. The code I’m using to test this currently looks as follows: Thanks in advance for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Hi @AndiSchratti ,
Curious also about what @finetjul and @jourdain think about this |
Beta Was this translation helpful? Give feedback.
I think it might be interesting to contribute it in VTK.js directly, from my understanding in the CanvasView, which manage the img tag.
Or you do some CSS yourself to add this capability to your application. One solution would be to give a specific id to a top level element that you have control over in your application. Then use CSS child selectors to specifically target the img tag.