From 0547143fef15acf14fd951eaafa6e439b0d37333 Mon Sep 17 00:00:00 2001 From: BurningTreeC Date: Sun, 10 Nov 2024 20:07:21 +0100 Subject: [PATCH] fix reversed sliding of editor preview when sidebar is on the left --- core/ui/PageTemplate/sidebar-resizer.tid | 1 + core/wiki/macros/sidebar-resizer.tid | 2 +- core/wiki/macros/sliders.tid | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/ui/PageTemplate/sidebar-resizer.tid b/core/ui/PageTemplate/sidebar-resizer.tid index ceca2da6b..71e886ca6 100644 --- a/core/ui/PageTemplate/sidebar-resizer.tid +++ b/core/ui/PageTemplate/sidebar-resizer.tid @@ -8,6 +8,7 @@ code-body: yes \function resizer.state() [{$:/state/sidebar}] \function resizer.class() tc-main-sidebar-resizer \function set.throttling() yes +\function drag.direction.reverse() [match[left]then[yes]] :else[[no]] \whitespace trim <%if [match[show]] %> diff --git a/core/wiki/macros/sidebar-resizer.tid b/core/wiki/macros/sidebar-resizer.tid index 2892c1f19..7550a9cc9 100644 --- a/core/wiki/macros/sidebar-resizer.tid +++ b/core/wiki/macros/sidebar-resizer.tid @@ -326,7 +326,7 @@ title: $:/core/procedures/sidebar-resizer \function get.drag.diff() [subtract] -:map[match[left]thenmultiply[-1]else] +:map[match[yes]thenmultiply[-1]else] \end \procedure sidebar-resizer-pointermove-actions() diff --git a/core/wiki/macros/sliders.tid b/core/wiki/macros/sliders.tid index 141b0ee39..bc374a539 100644 --- a/core/wiki/macros/sliders.tid +++ b/core/wiki/macros/sliders.tid @@ -12,6 +12,7 @@ code-body: yes \function get.story-padding.right() 0px \function get.story-padding.left() 0px \function get.story.left() 0 +\function drag.direction.reverse() no \whitespace trim <$let @@ -48,6 +49,7 @@ code-body: yes \function set.throttling() no \function get.left.minwidth() [] \function get.right.minwidth() [] +\function drag.direction.reverse() no \whitespace trim