From cf560f06d38de26f15d463b43b4b05dda16c658d Mon Sep 17 00:00:00 2001 From: Wahyu Ramadhan Date: Mon, 12 Jun 2023 08:37:18 +0700 Subject: [PATCH] Fix update bobot --- edit-mode/function/restActivityLink.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/edit-mode/function/restActivityLink.js b/edit-mode/function/restActivityLink.js index 087f8e1..c239fa4 100644 --- a/edit-mode/function/restActivityLink.js +++ b/edit-mode/function/restActivityLink.js @@ -26,6 +26,13 @@ gantt.ajax.get({ function refresData(id){ console.log("refres triggered!!"); + + // Store the current scroll position + var scrollState = { + x: gantt.getScrollState().x, + y: gantt.getScrollState().y + }; + gantt.ajax.get({ url: `${base_url}activity/${ganttId}/${proyekId}/get`, headers: { @@ -47,6 +54,10 @@ function refresData(id){ expandTask(); } } + + // Restore the scroll position + gantt.scrollTo(scrollState.x, scrollState.y); + }); }