gridstack / gridstack.js

Build interactive dashboards in minutes.
https://gridstackjs.com
MIT License
6.68k stars 1.28k forks source link

Scale & Different Resolution Question #2682

Closed dassum03-BH closed 4 months ago

dassum03-BH commented 4 months ago

Subject of the issue

Resolution - 1920 x 1200 Aspect Ratio - 100%

image

Resolution - 1920 x 1200 Aspect Ratio - 125%

image

When in different aspect ratio, gridstack cuts the widget and adds scroll to it, any way to resolve this? Notice the "6% from last year" line been cut off..

This happens for screens with different resolution

I have tried sizeToContent: true attribute (both to grid & chidlren), it cuts off the widget:

without sizeToContent:

image

Without the attribute:

image

When resized, it behaves weirdly and increases the height

adumesny commented 4 months ago

I think you mean scale 1.25% not aspect ration (width/height). Are you saying sizeToContent doesn't handle div scaling (or detecting when you change it) ? not clear and you don't provide example showing issue.

dassum03-BH commented 4 months ago

@adumesny with scale, I meant this:

image

sizeToContent is cutting off widgets and unable to resize them vertically. Is there any alternative to the issue?

Btw, I'm using angular wrapper..

adumesny commented 4 months ago

looks like sizeToContent is not handling scale, not surprised as I don't use scale. is that browser or OS level or ?? - you are NOT providing a proper bug report with steps to reproduce - see template.

dassum03-BH commented 4 months ago

@adumesny

Your environment

Steps to reproduce

https://jsfiddle.net/chelsumz007/6yftckrv/5/

In the jsfiddle prototype, adding some more data as text. Change the scale using windows properties to some other %. Now the same gridstack item is cutting off the data inside the tile

100% scale (Windows OS display settings):

image

125% scale (Windows OS Display Settings):

image

adumesny commented 4 months ago

not a bug the way you posted it. see the error messages....

image