Comments (2)
When 'Compact type none' is selected, and we move one piece across others, they move out of the way. However, when they no longer block the moving piece, they remain in the moved position and don't return to their default position, as they should.
Yes, it works exactly that way, same as React-grid-layout.
React Grid Layout handles this by making every element static except the one that is being dragged. However, I would like to see an option where we can create another compactType for these static elements.
I understand that the workaround React Grid Layout users are implementing is to set every grid item as static during the drag action... So, there is a workaround available also in Angular Grid Layout.
However, I am okay with implementing another grid compact option to support this use case, we can try and see how it feels. I also would not discard removing the non-compaction mode as it is now in the near future... for me is weird that the grid items that you are not dragging are moving constantly their positions... I find a hard time to fit this functionality into someone's use case.
In the absence of a selected compactType, it should work in a way that prompts every element to return to its original position when not obstructed by the moving element.
That would be a breaking change, and users who have no compact type would see their functionality changed. I propose adding a new option, such as 'free', 'free-lock', 'neutral', 'none'... I'm not sure, but definitely another option for now. As said, maybe in the future we might replace the non-compaction mode as it is now with the one you are suggesting, but for now, adding another option is the way to go IMO.
from angular-grid-layout.
Related Issues (20)
- Add v0 branch HOT 1
- Angular 16 support to use standalone component and signals HOT 8
- Have you supported feature related in drag and drop to add new item in grid and nested grid?
- How to auto adjust the grid height based on content
- Dragging and Resizing not working on windows touch screen HOT 1
- Can I give specific colour to the cell from database?
- Feature to download whole layout as a pdf HOT 1
- Grid items not resizing if container is resized HOT 1
- Feature Request - New Directive for Dragging Items into Grid HOT 2
- Documentation for backgroundConfig HOT 1
- Emit layoutUpdated event when adding or removing items from grid HOT 2
- Absolute width/height
- BUG(demo-app): Drag and resize in custom handles example does not work well, it gets interrupted by the default browser drag action. HOT 1
- Upgrade Angular version
- Support for Angular 16? HOT 1
- RTL direction HOT 2
- Setting Max-height for grid HOT 1
- Drag doesn't work properly when the drag handle is in a child component HOT 2
- Responsive number of columns HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-grid-layout.