Giter VIP home page Giter VIP logo

Comments (6)

swiety85 avatar swiety85 commented on May 23, 2024 2

If I understand it right, only "x" position will change, right? Events on position change are broken now (#16) but it will be fixed with release 0.5.0 next week.
Then you can use:
<gridster-item [x]="item.x" (xChange)="itemChanged(item, $event)"></gridster-item>
or
<gridster-item [(x)]="item.x"></gridster-item>
Then "x" property of "item" object will be automatically updated on drop to new position.

Would it be enough?

from angular2gridster.

swiety85 avatar swiety85 commented on May 23, 2024

Currently you can register on "x", "y", "w", "h" change. It will be two way binded in new release.
If you wish to have some more specific events on gridster-item, write me a list with explanations. I will consider implement them before new release.

Dragging out is not possible for now - gridster-item will try to be placed in most accurate position in board while dragging outside - placeholder is showing the position.
There is a plan to drag and drop items between different boards (and then such event would be needed), but what is your plan for this event?

from angular2gridster.

helldog136 avatar helldog136 commented on May 23, 2024

The project i'm currently working on is an interface to create schedules.
The goal is to put kind of a table element but with grid items that you can swap (ie the element in 0,3 goes in 2,3 and 2,3 goes in 0,3) The only way i see this can be done is by listening to the drag of cell 0,3, registering x and y and when the drop is done, cancel it and change the data structure...
I know it's very ugly but i'm a big newbie in angular and i didn't find any library that does that easily...

from angular2gridster.

helldog136 avatar helldog136 commented on May 23, 2024

Yes it think so :-)

from angular2gridster.

swiety85 avatar swiety85 commented on May 23, 2024

v. 0.5.0 is ready. Events for position change should work now.

from angular2gridster.

swiety85 avatar swiety85 commented on May 23, 2024

in version 0.5.0 build code was broke therefore events for position and resize was not called ( #8 ).
Now it's fixed with version 0.5.1

from angular2gridster.

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.