Side panel resize stretches the image and then resizes

We are developing our own viewer by referring to OHIF code. In our application, when we close/open the side panel, image on the viewport stretches for a small moment and then restores itself which is visually visible. On other hand OHIF has a smooth transition. The CSS and the code is exactly the same. We are using version 2 of cornerstone3d. Any suggestions? What could be possible error?

Yeah i hate that, i don’t have a solution unfortunatelly yet