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
bd4b4027
Commit
bd4b4027
authored
Aug 19, 2020
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Zoom: Middle zoom button now zooms to actual project duration
rather then duration when delivering the page
parent
9f98ba69
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
GanttZoomController.js
www/controller/GanttZoomController.js
+15
-2
No files found.
www/controller/GanttZoomController.js
View file @
bd4b4027
...
@@ -114,10 +114,23 @@ Ext.define('GanttEditor.controller.GanttZoomController', {
...
@@ -114,10 +114,23 @@ Ext.define('GanttEditor.controller.GanttZoomController', {
if
(
me
.
debug
)
console
.
log
(
'GanttEditor.controller.GanttZoomController.zoomEntireProject: Started'
);
if
(
me
.
debug
)
console
.
log
(
'GanttEditor.controller.GanttZoomController.zoomEntireProject: Started'
);
var
ganttBarPanel
=
me
.
getGanttBarPanel
();
var
ganttBarPanel
=
me
.
getGanttBarPanel
();
// calculate min- and max dates of the tasks
var
reportStartTime
=
new
Date
(
'2099-12-31'
).
getTime
();
var
reportEndTime
=
new
Date
(
'2000-01-01'
).
getTime
();
var
rootNode
=
ganttBarPanel
.
objectStore
.
getRootNode
();
rootNode
.
cascadeBy
(
function
(
model
)
{
var
start_date
=
model
.
get
(
'start_date'
);
var
end_date
=
model
.
get
(
'end_date'
);
var
startTime
=
PO
.
Utilities
.
pgToDate
(
start_date
);
var
endTime
=
PO
.
Utilities
.
pgToDate
(
end_date
);
if
(
startTime
<
reportStartTime
)
reportStartTime
=
startTime
;
if
(
endTime
>
reportEndTime
)
reportEndTime
=
endTime
;
});
// Default values for axis startDate and endDate
// Default values for axis startDate and endDate
var
oneDayMiliseconds
=
24
*
3600
*
1000
;
var
oneDayMiliseconds
=
24
*
3600
*
1000
;
var
reportStartTime
=
ganttBarPanel
.
reportStartDate
.
getTime
();
var
reportEndTime
=
ganttBarPanel
.
reportEndDate
.
getTime
();
var
panelBox
=
ganttBarPanel
.
getBox
();
var
panelBox
=
ganttBarPanel
.
getBox
();
var
panelWidth
=
panelBox
.
width
;
var
panelWidth
=
panelBox
.
width
;
var
panelHeight
=
panelBox
.
height
;
var
panelHeight
=
panelBox
.
height
;
...
...
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