Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grid size issue #40

Closed
kirtiesl opened this issue May 9, 2017 · 6 comments
Closed

grid size issue #40

kirtiesl opened this issue May 9, 2017 · 6 comments
Labels

Comments

@kirtiesl
Copy link

kirtiesl commented May 9, 2017

I am having dynamically generated grid-items. Could you please provide exact meaning of maxItemCols,minItemCols,maxItemRows,minItemRows,defaultItemCols,defaultItemRows,fixedColWidth, fixedRowHeight, and other properities. As this library is behaving strange, its not behaving as the way of height and width.

@tiberiuzuld
Copy link
Owner

tiberiuzuld commented May 9, 2017

Hi @kirtiesl
What do you mean by strange ? the whole behavior depends on width and height of the container.

The defaultOptions here and explanation

So defaultItemCols and defaultItemRows is the number is set on an item that doesn't have cols and rows

These fixedColWidth and fixedRowHeight are for gridType:fixed and they say a fixed height for rows and width for columns in pixels.

These maxItemCols,minItemCols,maxItemRows,minItemRows refer to min and max the items in the grid can resize to by the user.

I hope this answers your questions
Let me know if you have any more questions

@karanaditya993
Copy link

do you mean gridType: fit instead of gridType: fixed?

@tiberiuzuld
Copy link
Owner

tiberiuzuld commented May 9, 2017

No.
gridType: fit will adjust to container size. Items will have row height and column width depending on that container sizes. So the dashboard will not have any scrollbars.

gridType: fixed will have the width and height of the container but the items will have a fixed row height and column width provided by the options fixedRowHeight and fixedColWidth. In this case the dashboard can have both scrollbars present.

gridType: fixed and some other options are not available in 1.x version. In case you use angularjs@1.x

@kirtiesl
Copy link
Author

Could you tell how to set max number of grid-item in columns and rows??

@tiberiuzuld
Copy link
Owner

tiberiuzuld commented May 10, 2017

You mean max number of items you can have in a grid ?
Then if you put in only 1:1 items in a grid of 2:2 you will have 4 items.
So defaultItemCols and defaultItemRows 1
And maxCols, maxRows 2
But I will do this check in the add button function more easily. grid.length > 3 then don't add.

Why would you want to restrict the grid this much ?
If you restrict the grid this much then why use it? Why don't you use the grid from material or bootstrap?

@tiberiuzuld
Copy link
Owner

Closing issue because of no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants