diff --git a/app/components/p8p_gantt.js b/app/components/p8p_gantt.js index 6c562b2..9a4c48e 100644 --- a/app/components/p8p_gantt.js +++ b/app/components/p8p_gantt.js @@ -78,10 +78,22 @@ const P8P_GANTT_TASK_COLOR_SHAPE = PropTypes.shape({ desc: PropTypes.string.isRequired }); +//Высота заголовка +const TITLE_HEIGHT = "44px"; + +//Высота панели масштабирования +const ZOOM_HEIGHT = "56px"; + //Стили const STYLES = { TASK_EDITOR_CONTENT: { minWidth: 400, overflowX: "auto" }, - TASK_EDITOR_LIST: { width: "100%", minWidth: 300, maxWidth: 700, bgcolor: "background.paper" } + TASK_EDITOR_LIST: { width: "100%", minWidth: 300, maxWidth: 700, bgcolor: "background.paper" }, + GANTT_TITLE: { height: TITLE_HEIGHT }, + GANTT_ZOOM: { height: ZOOM_HEIGHT }, + GANTT: (noData, title, zoomBar) => ({ + height: `calc(100% - ${zoomBar ? ZOOM_HEIGHT : "0px"} - ${title ? TITLE_HEIGHT : "0px"})`, + display: noData ? "none" : "" + }) }; //-------------------------------- @@ -318,7 +330,7 @@ P8PGanttTaskEditor.propTypes = { //Диаграмма Ганта const P8PGantt = ({ - height, + containerStyle, title, titleStyle, onTitleClick, @@ -408,10 +420,16 @@ const P8PGantt = ({ //Генерация содержимого return ( -