-
Notifications
You must be signed in to change notification settings - Fork 23
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
Fixed tile size #12
Comments
What exactly are you trying to achieve? The layout is tiled by default, and it could be considered "fixed" if you make it non-editable. Are you referring to fixed as in fixed pixel width/height per item? |
Sorry, I'm too generic. What I mean is: at the moment I can place a tile in a specific position and a specific dimension. If I add a new tile it will be placed in the biggest available space in the grid. What I'm looking for is to place a new element in the grid with a given fixed width/height and the top/left calculated automatically by the directive. There is a way to accomplish this? |
If that fixed width/height is constant for every new element, you can easily implement this behavior by changing this method to not return the largest empty area, but the most appropriate location that would fit the new element (or null). To preserve backward compatibility, you could switch behavior based on a parameter. If the width/height does vary, you could get rid of the cached next position, thus re-computing the next position on every call, and consider the desired element size when determining it. |
Yes, you are right. I might check this function before asking. I'll try to mod the function or add a total new logic to implement it as new feature. In the meantime I've modded the lib to use a double binding and parametrize the resizable/movable attributes per item. #13 |
Good stuff! I'll process the PR on the weekend. |
There is a way to implement a fixed tiled layout?
The text was updated successfully, but these errors were encountered: