Coder Social home page Coder Social logo

Comments (2)

llorenspujol avatar llorenspujol commented on August 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.