angular-gantt
angular-gantt copied to clipboard
Tasks are not moving after gantt is loaded
When you try to move the task it does not react on mouse click in gantt tree. It only works after the gantt tree is completely minimized and then resized to normal. This happens in angular gantt version 1.2.13. Any previous version works fine.
I confirm same problem. Task (mouse drag) move works on 1.2.12, but after upgrade to 1.2.13 it does not work.
Interesting... I still have version 1.2.8 which has worked well for our needs, but I recently started seeing this behavior/problem after upgrading to Angular 1.5.9. Minimizing the gantt tree appears to restore the capabilities. Any idea what is behind this or how to fix besides asking users to minimize tree and reopen?
It looks like upgrading to 1.2.13 restores the functionality following initial load (without the minimization need) with Angular 1.5.9.
Angular 1.5.6 Angular-gantt 1.2.14
Also experiencing this issue. In short, I load the data first time, I am able to move nothing. I load more data and I am able to move tasks. I did some digging and found out at least this:
In file: angular-gantt/src/plugins/movable.js
var onPressEvents = function(evt) {};
This function is never called after only the first load of the tasks. Additionally these elements appear to be undefined (or rather are empty JQlite objects) on the first load:
var foregroundElement = taskScope.task.getForegroundElement();
// IE<11 doesn't support `pointer-events: none`
// So task content element must be added to support moving properly.
var contentElement = taskScope.task.getContentElement();
Any ideas?
Same problem.
I've noticed that when the tasks are first loaded their directives weren't transformed to taskScope.task.getContentElement()
try to get the element by the class this.$element[0].querySelector('.gantt-task-content')
this object is returning null
.
I just don't know how to solve that. Any light @Toilal ?
No sorry :(. Reproducing the issue on plunkr or a minimal github project would help.
Same problem here also.
As @andrepaulo mentioned it seems to be originating from this.$element[0].querySelector('.gantt-task-content')
returning null. This is because upon evaluating getForegroundElement()
and getContentElement()
the task template hasn't fully rendered yet, looking something like this:
<div class="gantt-task" ng-class="task.model.classes">
<gantt-task-background></gantt-task-background>
<gantt-task-foreground></gantt-task-foreground>
<gantt-task-content></gantt-task-content>
</div>
So trying to find the element with the associated classes using the querySelector
fails. Not sure how to rectify this though...
These changes fix the behavior: https://github.com/animustech/angular-gantt/commit/48108cec28174000a32a74aff85cde476c1fbd39#diff-54c74346f92ae0133fd289da2c74da12
Any change to get them merged? Would a PR be appreciated?
I am facing the same issue ? any update on solving this issue?