From 660e0f3d8b5fef2c05a02474658553aa0337b9b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jason=20W=C3=BCrtz?= Date: Sun, 7 Jul 2019 16:27:28 -0300 Subject: [PATCH] refactor(ganttDb): separate out the inclusive end date toggle --- src/diagrams/gantt/ganttDb.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/diagrams/gantt/ganttDb.js b/src/diagrams/gantt/ganttDb.js index 48cfd0bb9..a8a34b313 100644 --- a/src/diagrams/gantt/ganttDb.js +++ b/src/diagrams/gantt/ganttDb.js @@ -37,9 +37,16 @@ export const getAxisFormat = function () { return axisFormat } -export const setDateFormat = function (txt, inclusive) { +export const setDateFormat = function (txt) { dateFormat = txt - inclusiveEndDates = inclusive || false // make sure it's not undefined +} + +export const enableInclusiveEndDates = function () { + inclusiveEndDates = true +} + +export const endDatesAreInclusive = function () { + return inclusiveEndDates } export const getDateFormat = function () { @@ -518,6 +525,8 @@ export default { clear, setDateFormat, getDateFormat, + enableInclusiveEndDates, + endDatesAreInclusive, setAxisFormat, getAxisFormat, setTitle,