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

resizing grid items #18

Open
ralcar opened this issue May 29, 2018 · 1 comment
Open

resizing grid items #18

ralcar opened this issue May 29, 2018 · 1 comment

Comments

@ralcar
Copy link

ralcar commented May 29, 2018

Just found this project, very impressed, maybe i have not read through everything yet and missed it.
But is it possible, or will it be in the future possible, to resize the grid items?
This grid has absolutly everything i need, except that.

If not, would it be possible for me to add it myself?

@nix23
Copy link
Owner

nix23 commented May 29, 2018

Hello.
Gridifier is not modifying DOM nodes or their sizes in any way. (It is responsible only for item position manipulation + animation) - so if you will create resize handler and change DOM node css sizes on that handle drag events the only thing you should do is to ensure grid.reposition() is called after item sizes change. Probably it will look somehow like this:

var functionToCallOnDragHandlerMove = function() {
     // Change all items width/height or class names like $(".grid-item").addClass("smallSize"); 
    gridifierInstance.reposition(); // Call reposition to notify gridifier about size changes
};

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

No branches or pull requests

2 participants