Angular-gridster2: "Fit to screen" option doesn't fill the entire screen

Created on 13 Oct 2017  路  10Comments  路  Source: tiberiuzuld/angular-gridster2

On the right side is still some empty space:
gridster-bug-16x9

I changed 4 lines of code in the gridster.component.ts file.

if (this.$options.outerMargin) {
      this.curColWidth = (this.curWidth - this.$options.margin) / this.columns;
      this.curRowHeight = (this.curHeight - this.$options.margin) / this.rows;
} else {
      this.curColWidth = (this.curWidth + this.$options.margin) / this.columns;
      this.curRowHeight = (this.curHeight + this.$options.margin) / this.rows;
}

Now it works and looks like this:
gridster-bug-16x9-fixed

I dont know if this affects any other feature in the gridster module.

bug question

All 10 comments

Hi @marcingold ,
I think you chosen fixed option not fit.
At least seems that way from the screenshot.

I am not able to reproduce what you are showing in the screenshot only on fixed grid type.

Thanks,

Close for inactivity.

I'm back ;-)
These are the options I used, so hopefully u can reproduce the bug.
options

The important part is that u set the min / max grid rows / cols to the aspect ration of ur screen (browser is in fullscreen mode).
Example: 1920x1080p like my screen -> Max/Min cols = 16 and Max/Min rows = 9
So the result is:
bug

If u multipli these 4 options by 2, 3, 4 etc. it's even more visible.
image

If u can reproduce this bug, the fix in my first comment should still work

PS: Sorry for open this thread again ;)

Hi @marcingold,
Ok now I understand what you mean.
Will look into it this weekend.

Thanks

Hi @marcingold ,

Fixed the issue in v4.3.0

Let me know if works ok now.

Thanks

Would you mind by any chance to release this for angular 4 lts too?

Hi @tauchmi ,
It is released for angular4 https://github.com/tiberiuzuld/angular-gridster2/blob/4.x/src/lib/gridster.component.ts#L203

In version 3.18.0
Does the package released on npm does not contain it ?

Thanks

D'oh, yes you are right. Thank you for this great Module!

It's working 馃憤 thx :)

Great!

Thanks for feedback and solution for fix.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

samarsiraj picture samarsiraj  路  3Comments

marco-martins picture marco-martins  路  4Comments

JohnxAss picture JohnxAss  路  5Comments

HighSoftWare96 picture HighSoftWare96  路  4Comments

petarGitNik picture petarGitNik  路  3Comments