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

Filter error and incorrect positioning of drag handle #13

Open
gds3k3 opened this issue Feb 11, 2017 · 2 comments
Open

Filter error and incorrect positioning of drag handle #13

gds3k3 opened this issue Feb 11, 2017 · 2 comments

Comments

@gds3k3
Copy link

gds3k3 commented Feb 11, 2017

Hello. Firstly, thank you for sharing this nice script.

I was playing with it all day, and got some problems.
Script successfully append items, resize, drag & drop, all good but on filtering I got "Uncaught Error: Gridifier error: too wide(ver.grid)/too tall(hor.grid) item".

Also, when clicking on a handle for dragging, some children elements get outside the item.

drag_err

Any idea? Thanks.

@nix23
Copy link
Owner

nix23 commented Feb 11, 2017

Hello.
Can you post your grid/grid item CSS code?
'Too wide(ver.grid)' (with verticalGrid) error is thrown when appended item can't be inserted inside container because item width is > than grid width. (For example grid width is 800px, item width is 810px)

Problem with handle can be caused because of different reasons:
By default Gridifier will create draggable item clone and append it to body(http://gridifier.io/dragifiers/decorators) - after inspecting screenshot and your first problem(with error) it looks like there is some problem with grid item sizes. (That is why that error is thrown and items are placed 'outside' of item).

@gds3k3
Copy link
Author

gds3k3 commented Feb 13, 2017

Thank you for your fast answer.
I could track the "too wide/too tall" filter error to something to do with grid parent div being hidden when aplying filtering function. I have to hide/show that div to simulate a tabbed interface, filtering when parent is hidden brings that error.

Children item elements steel get wrong positioning while dragging, here is the css:

`.grid {
max-width: 1200px;
position: relative;
width: 90%;
}

.grid_item {
margin: 0px 26px 26px 0px;
padding: 0px;
border: 4px;
border-color: #9ecaed;
background-color: #3d3d3d;
color:white;
width: 240px;
height:140px;
}

.grid_item i{ /toolbar icons including handle/
margin: 0px 1px 0px 1px;
padding: 0px 2px 0px 2px;
float: right;
}
`

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