Scal bug when I set topinpixels

After zooming in, set topinpixels to the panel.
For example panel.scalX = panel.scalY = 3;
Then set topinpixels = 501 ,the panel disappears.
but set topinpixels = 500, the panel is in the right place.

for exapmle https://www.babylonjs-playground.com/#9YD7DK#2

Hi @zhiyuanbuqi

I tried your PG but I’m not sure about what happens. Can you modify your PG to highlight your issue. Like by commenting a line. Or 2 PGs. 1 that works and 1 that doesn’t. I’d be happy to help :slight_smile:

Thanks!

Hi @Cedric
F12 starts the development mode.
this top = 500

then top = 501

thanks

I can repro the issue!
I’ll try to reduce the PG even more if I can.

I have a stupid way to increase the size of his parent. But I want to find the fundamental way to solve such problems.
Thanks

The issue you get is because of the scale. It’s used to map one panel into the other one. If the scale is > 1 then, the coordinates of panel are bigger than panelk. This clamps the rendering. if you set the scale to values between 1 and 2, you’ll get clamping at different positions.
So, if you do not want clamping, I suggest you to keep scaleX, scaleY at 1 and change heightInPixels and widthInPixels instead.

Thanks