[Bug #1105] Fix bug
The dependency was unable to add because task containers were not considered. FEA: ItEr75S04BugFixing
This commit is contained in:
parent
a4a8771698
commit
e1a53c82ed
2 changed files with 14 additions and 8 deletions
|
|
@ -286,14 +286,13 @@ ganttz.UnlinkedDependencyComponent = zk.$extends(ganttz.DependencyComponentBase,
|
|||
ganttz.DependencyList.getInstance().removeChild(this);
|
||||
},
|
||||
_isOverTask : function() {
|
||||
var tasksArray = jq('div[z\\.type="ganttz.task.Task"]');
|
||||
var overTask = null;
|
||||
|
||||
tasksArray.each(function(index, element){
|
||||
if(ganttz.TaskComponent.$(element.id).mouseOverTask) overTask = ganttz.TaskComponent.$(element.id);
|
||||
var tasksOver = jq.grep(ganttz.TaskComponent.allTaskComponents(), function(task) {
|
||||
return task.mouseOverTask;
|
||||
});
|
||||
|
||||
return overTask;
|
||||
if (tasksOver.length > 0) {
|
||||
return tasksOver[0];
|
||||
}
|
||||
return null;
|
||||
},
|
||||
_getCoordOrigin: function() {
|
||||
if (this._coordOrigin) {
|
||||
|
|
|
|||
|
|
@ -228,5 +228,12 @@ ganttz.TaskComponent = zk.$extends(zul.Widget, {
|
|||
_PERSPECTIVES_WIDTH : 80,
|
||||
CORNER_WIDTH : 20,
|
||||
HEIGHT : 10,
|
||||
HALF_HEIGHT : 5
|
||||
HALF_HEIGHT : 5,
|
||||
allTaskComponents: function() {
|
||||
var tasksArray = jq('div[z\\.type="ganttz.task.Task"]')
|
||||
.add('div[z\\.type="ganttz.taskcontainer.TaskContainer"]');
|
||||
return jq.map(tasksArray, function(element) {
|
||||
return ganttz.TaskComponent.$(element.id);
|
||||
});
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Reference in a new issue