keep board horizontal scroll across refresh: restore scrollLeft after #board-container rebuild; v1.0

This commit is contained in:
2026-07-06 21:12:26 -03:00
parent 1bea749fed
commit 9c27b51eed
6 changed files with 91 additions and 3 deletions

View File

@@ -26,6 +26,14 @@ class Plugin extends Base
if ((int) $this->configModel->get('organon_tweaks_always_comment_icon', 1) === 1) {
$this->template->hook->attach('template:board:task:icons', 'organonTweaks:board/task_comment_icon');
}
// Tweak: keep the board horizontal scroll position across refreshes (Kanboard
// rebuilds #board-container on card drop / polling, resetting scrollLeft to 0).
if ((int) $this->configModel->get('organon_tweaks_keep_scroll', 1) === 1) {
$this->hook->on('template:layout:js', array(
'template' => 'plugins/OrganonTweaks/Asset/js/keep-scroll.js',
));
}
}
public function getHelpers()
@@ -52,7 +60,7 @@ class Plugin extends Base
public function getPluginVersion()
{
return '0.3.1';
return '1.0.0';
}
public function getPluginHomepage()