From 5479d1d9b05dced580c0e9d529c23cb2f0e8e259 Mon Sep 17 00:00:00 2001 From: Hans5958 Date: Sun, 19 Mar 2023 11:55:56 +0700 Subject: [PATCH] Use current view state for new periods Resolves #1368 --- web/_js/draw.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/_js/draw.js b/web/_js/draw.js index f8b1b855..ce81a735 100644 --- a/web/_js/draw.js +++ b/web/_js/draw.js @@ -747,7 +747,7 @@ function initDraw() { } else { document.getElementById("offcanvasDrawLabel").textContent = "New Entry" - pathWithPeriods.push([defaultPeriod, []]) + pathWithPeriods.push([formatPeriod(currentPeriod, currentPeriod, currentVariation), []]) // Builds multi-input list addWebsiteFields("", 0, [0]) @@ -778,7 +778,7 @@ function initDraw() { }) periodsAdd.addEventListener('click', () => { - pathWithPeriods.push([defaultPeriod, []]) + pathWithPeriods.push([formatPeriod(currentPeriod, currentPeriod, currentVariation), []]) initPeriodGroups() })