Comments (6)
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.
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.
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.
Yes it think so :-)
from angular2gridster.
v. 0.5.0 is ready. Events for position change should work now.
from angular2gridster.
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)
- emitter for currently selected or clicked or active gridster item
- ERROR on creating gridster inside mat tab group
- npm start not working after installation of code HOT 5
- reloading grids sometimes makes heights size 1
- Provide service using { providedIn: 'root' } HOT 1
- Error when deploying angular 9 app to dev server (My bad)
- Angular 11 support HOT 2
- Angular 12 Support? HOT 1
- How to load the grid without dragAndDrop and Resize
- widget width not increase, need help
- When I use draggableOptions,I think have an ignoreContentClass option maybe is better?
- Angular 13 support HOT 1
- Can't bind to config
- Fix peerDependencies HOT 4
- Question: Is this project abandoned?
- Resizing from the top does not update the position until finished.
- Resizing does not correctly scroll when the scroll container is the body
- Focus and reading order is not as per the visual order
- Clicking and dragging the horizontal/vertical scroll bar no longer works
- There is a minute gap between 2 gridster Item even though margin set as zero and the gap is not consistent in all the items. How to resolve this gap issue
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 angular2gridster.