Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-gantt-editor
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-gantt-editor
Commits
c32d03de
Commit
c32d03de
authored
Jul 16, 2020
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Now using a hash to avoid duplicated
entries in the list of changedNodes
parent
c02e9f73
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
GanttSchedulingController.js
www/controller/GanttSchedulingController.js
+15
-2
No files found.
www/controller/GanttSchedulingController.js
View file @
c32d03de
...
...
@@ -914,13 +914,21 @@ Ext.define('GanttEditor.controller.GanttSchedulingController', {
// Initialize with the list of all tasks in the tree
var
changedNodes
=
[];
rootNode
.
cascadeBy
(
function
(
task
)
{
changedNodes
.
push
(
task
);
});
var
changedNodesHash
=
{};
rootNode
.
cascadeBy
(
function
(
task
)
{
changedNodes
.
push
(
task
);
var
taskId
=
task
.
get
(
'id'
);
changedNodesHash
[
taskId
]
=
task
;
});
// Iterate through all nodes until we reach the end of successor chains
var
iterationCount
=
0
;
while
(
changedNodes
.
length
>
0
)
{
iterationCount
++
;
var
changedNode
=
changedNodes
.
shift
();
// Get and remove the first element from stack
var
taskId
=
changedNode
.
get
(
'id'
);
delete
changedNodesHash
.
taskId
;
var
nodeId
=
''
+
changedNode
.
get
(
'id'
);
if
(
me
.
debug
)
console
.
log
(
'PO.controller.gantt_editor.GanttSchedulingController.schedule: '
+
'Iteration='
+
iterationCount
+
': Checking id='
+
nodeId
+
', name='
+
changedNode
.
get
(
'project_name'
));
...
...
@@ -934,7 +942,12 @@ Ext.define('GanttEditor.controller.GanttSchedulingController', {
var
succModel
=
directSuccs
[
succId
].
succModel
;
var
depModel
=
directSuccs
[
succId
].
depModel
;
nodes
=
me
.
scheduleXToY
(
treeStore
,
changedNode
,
succModel
,
depModel
);
for
(
var
i
=
0
;
i
<
nodes
.
length
;
i
++
)
changedNodes
.
push
(
nodes
[
i
]);
for
(
var
i
=
0
;
i
<
nodes
.
length
;
i
++
)
{
var
task
=
nodes
[
i
];
var
taskId
=
task
.
get
(
'id'
);
if
(
changedNodesHash
[
taskId
])
{
continue
;
}
changedNodes
.
push
(
task
);
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment