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

Demo: Dragging and resizing of grid items not working with newest ng and ng-cli versions #68

Closed
AlMuIssues opened this issue Jul 13, 2017 · 7 comments
Assignees

Comments

@AlMuIssues
Copy link

Please create new angular project( I tried it with this versions ):
angular/cli: 1.2.1
node: 8.1.0
os:linux64
angular/...:4.2.6
angular/compiler:4.2.6
angular/language-service: 4.2.6

Put your demo code inside and run the application. Problem on PC( Chrome and Firefox ):
Drag&Drop behavior: drap a grid item and drop it anywhere in gridster. The item stays at the position where droped, he doesn't take automatically position in the grid.
Resize behavior: by resizing the item its size not fit the size of lanes. After resizing the mouse position is still connected with grid item. Click without the item resolve the connection and caused automatically item resizing.

@swiety85
Copy link
Owner

I was able to reproduce this problem. I will fix it as soon as possible.
Thanx for info.

@swiety85 swiety85 self-assigned this Jul 13, 2017
@swiety85 swiety85 added this to In progress in Angular2gridster Jul 13, 2017
swiety85 added a commit that referenced this issue Jul 14, 2017
Solve problem with not working drag n drop events in angular 4.2.6.
Issue: #68
@swiety85
Copy link
Owner

This was really strange issue. There were some breaking changes about how Rx.js publishes DOM events.
Regardless of that I found the solution. Fix is in v.0.6.3.
Please check it, and give a hint if it works for you.

@AlMuIssues
Copy link
Author

It works fine in v.0.6.3.
Thanks....

@tssobe
Copy link

tssobe commented Jul 17, 2017

Hi
It works now but after some drags the grid freezes and it is not possible to drag an item.
Anyone else have this issue?
This is from console:
TypeError: Cannot set property '1' of undefined
at GridList.markItemPositionToGrid (gridList.js:353)
at GridList.generateGrid (gridList.js:42)
at new GridList (gridList.js:14)
at GridsterService.initGridList (gridster.service.js:47)
at GridsterService.start (gridster.service.js:38)
at GridsterComponent.ngAfterViewInit (gridster.component.js:50)
at callProviderLifecycles (core.es5.js:11180)
at callElementProvidersLifecycles (core.es5.js:11155)
at callLifecycleHooksChildrenFirst (core.es5.js:11139)
at checkAndUpdateView (core.es5.js:12244)
Thanks

@swiety85 swiety85 moved this from In progress to Test in Angular2gridster Jul 17, 2017
@swiety85 swiety85 moved this from Test to Closed in Angular2gridster Jul 17, 2017
@swiety85
Copy link
Owner

Send me please your config objects for Gridster. I will try to reproduce your problem.

@tssobe
Copy link

tssobe commented Jul 17, 2017

public gridsterOptions: IGridsterOptions = {
    lanes: 8,
    direction: 'vertical',
    widthHeightRatio: 1,
    dragAndDrop: false,
    resizable: false,
};

public itemOptions = {
    minHeight: 2,
    defaultWidth: 1,
    defaultHeight: 1,
    maxWidth: 8,
    maxHeight: 3
}

But I also change synamically the w,h and dragAndDrop and resizable

@sudhakar-sekar
Copy link

Hi @tssobe,

I am also facing same problem. I am using v1.5.1.
Please guide me how to resolve the above issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Angular2gridster
  
Closed
Development

No branches or pull requests

4 participants