Open Sandeepvedam opened 7 years ago
Hello,
So data-table is another angular component right ? Did it use some events ? Because maybe it intercept events and make the dragging not working...
Yes. data-table is another component. I have not used events in table component. I have mentioned event(onDrag) in dashboard tag. Can i mention same to data-table selector?
The onDrag event will work only for the widget itself, not child components I will try to reproduce the problem, if you have the possibility to create a small project to reproduce the problem it can help me see what's wrong. I never encounter this before
Yes. I will create sample project. So that we can reproduce the problem
Hello,
Here is the GIT repo : https://github.com/Sandeepvedam/angular-widgets
Thanks ! I'll take a look asap and let you know :)
Okay. Thanks
I take a quick look and it's weird should work... On my project I do like this https://github.com/mylisabox/lisa-ui/blob/master/src/app/components/widget/widget.component.html#L1 with the widgethandle directive but can't test on your sample as there some compilation errors (but I was able to run it)... The only difference is that on my project I add widgets dynamically where you add them statically so maybe there a problem there. Can you test to play with the directive and let me know please ?
I saw your code. It is making some what confusion to me with out running the application. When i run the app it is failing API calls. :)
I added something like below. Is that correct format.
widgets = [ { "id": 1, "name": "DataTable", "size": [ 4, 3 ] }, { "id": 2, "name": "BarChart", "size": [ 2, 2 ] } ];
Still i am not able to drag. May be way of writing code is wrong in my case. Can you please help me :)
As I say it may not be because of your code if widgets with basic HTML inside are draggable... Maybe something is wrong on the library code for static widgets (as you can see mine are not added there https://github.com/mylisabox/lisa-ui/blob/master/src/app/pages/home/home.component.html#L54, they are added dynamically). I need to dig more into this see what wrong... I'll try to reproduce on my demo project, it will be easier to see what's wrong there. Thanks for the feedback !
Thank you very much.
We can not drag one widget into available space.
Let's say from above image. I can't drag table widget beside to chart widget. It will be good if you provide this kind of features.
http://angular-dashboard-framework.github.io/angular-dashboard-framework/#/sample/01 http://wrapbootstrap.com/preview/WB0573SK0
I don't plan to do such feature as I don't need it (I made this project for my L.I.S.A. project to manage widget dashboard) and the behavior I want for this project is this one. I think to do such feature you need to change the all algorithm to be able to do that because the current one only place widget on the next available position and it's not aware of anything else, there no real grid or something. Maybe I'm wrong but doesn't sound like an easy task to me.
The link you provide they work with a grid and widget are resized depending on this grid, here there no grid but widgets have size and are placed one after the other on the next available position.
Sorry for me English I hope I'm clear ^^
Okay. No problem.
However , Thank you very much for this plugin.
You're welcome :) I'll try to fix this problem asap
Hi,
Widget not adding with width and height if i push another object to below data dynamically.
widgets = [ { "id": 1, "name": "DataTable", "size": [ 4, 3 ] }, { "id": 2, "name": "BarChart", "size": [ 2, 2 ] } ];
how to update dashboard in above scenario?
On the demo app here is how I've done it https://github.com/jaumard/ngx-dashboard/blob/master/demo/src/app/app.component.ts#L48
Hi,
Custom Widget component is adding successfully. I found one issue. please use ngOnInit in Custom widget component then add widget component. You can see as it appears in the top.
Hello,
Did you call super.ngOnInit on yours ?
When i call super.ngOnInit() in ngOnInit. It's disturbing UI. UI not similar to ngOnInit
What do you mean by that ? As I do some stuff on it https://github.com/jaumard/ngx-dashboard/blob/master/src/components/widget/widget.component.ts#L19 if you don't call the super class it can do strange stuff, try copy/paste this line on your see if it's better
Yes. I resolved it by ngIf condition. However i am calling super.ngOnInit(). It's problem with styling in my component. Thank you very much. :)
Same issue I am also facing, trying to drag the data table from another child component. Dragging is not working. Can anyone tell me any solutions.
Inside some content is there means I can't drag. The drag is working on widget tag only. Inside is not working. Can you help me.
Hi,
First, Thanks for great plugin. :)
I am facing issue that is widget not dragging when i included table component selector inside widget tag.
Code:
Please help me.
Thanks, Sandeep.