diff --git a/core/wiki/macros/sidebar-resizer.tid b/core/wiki/macros/sidebar-resizer.tid index c031a0f67..1d685c168 100644 --- a/core/wiki/macros/sidebar-resizer.tid +++ b/core/wiki/macros/sidebar-resizer.tid @@ -6,23 +6,6 @@ title: $:/core/macros/sidebar-resizer \procedure sidebar-resizer-pointerdown-actions() <%if [[$:/state/sidebar/resizing]is[missing]thenmatch[left]] %> <$let startPosX=<> dragGripDiff=<> storyRiverWidth={{{ [subtractsubtract[14]add[42]] }}} sidebarWidth={{{ [subtractaddadd[14]] }}}> - <%if [{$:/themes/tiddlywiki/vanilla/options/sidebarlayout}match[fixed-fluid]] %> - <%if [is.pixel.value{$:/themes/tiddlywiki/vanilla/metrics/storyright}] %> - <$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/metrics/storyright" text={{{ [addsuffix[px]] }}}/> - <%elseif [is.percentage.value{$:/themes/tiddlywiki/vanilla/metrics/storyright}] %> - <$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/metrics/storyright" text={{{ [dividemultiply[100]addsuffix[%]] }}}/> - <% else %> - <$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/metrics/storyright" text={{{ [addsuffix[px]] }}}/> - <% endif %> - <% else %> - <%if [is.pixel.value{$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth}] %> - <$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth" text={{{ [addsuffix[px]] }}}/> - <%elseif [is.percentage.value{$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth}] %> - <$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth" text={{{ [dividemultiply[100]addsuffix[%]] }}}/> - <% else %> - <$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth" text={{{ [addsuffix[px]] }}}/> - <% endif %> - <% endif %> <%if [is.pixel.value{$:/themes/tiddlywiki/vanilla/metrics/storyleft}] %> <$action-setfield $tiddler="$:/state/sidebar/resizing" start-story-left={{{ [{$:/themes/tiddlywiki/vanilla/metrics/storyleft}compare:number:gteq[0]] ~0px }}}/> <%elseif [is.percentage.value{$:/themes/tiddlywiki/vanilla/metrics/storyleft}] %> @@ -30,7 +13,7 @@ title: $:/core/macros/sidebar-resizer <% else %> <$action-setfield $tiddler="$:/state/sidebar/resizing" start-story-left={{{ [{$:/themes/tiddlywiki/vanilla/metrics/storyleft}compare:number:gteq[0]] ~0px }}}/> <% endif %> - <$action-setfield $tiddler="$:/state/sidebar/resizing" text="yes" drag-grip-diff=<> widget-node-width=<> start-posx=<> start-story-right={{$:/themes/tiddlywiki/vanilla/metrics/storyright}}/> + <$action-setfield $tiddler="$:/state/sidebar/resizing" text="yes" drag-grip-diff=<> drag-grip-diff-right={{{ [subtract] }}} widget-node-width=<> start-posx=<> start-story-right={{$:/themes/tiddlywiki/vanilla/metrics/storyright}}/> <% endif %> \end @@ -233,7 +216,7 @@ title: $:/core/macros/sidebar-resizer \procedure sidebar-resizer-pointermove-actions() <%if [[$:/state/sidebar/resizing]!is[missing]] %> - <$let dragDiff={{{ [subtract{$:/state/sidebar/resizing!!start-posx}] }}} storyRiverWidth={{{ [subtract{$:/state/sidebar/resizing!!drag-grip-diff}subtract[14]add[42]] }}} sidebarWidth={{{ [subtractadd{$:/state/sidebar/resizing!!drag-grip-diff}add[14]] }}} widgetNodeWidth={{$:/state/sidebar/resizing!!widget-node-width}}> + <$let widgetNodeWidth={{$:/state/sidebar/resizing!!widget-node-width}} dragDiff={{{ [subtract{$:/state/sidebar/resizing!!start-posx}] }}} startStoryRight={{{ [is.percentage.value{$:/state/sidebar/resizing!!start-story-right}multiplydivide[100]] ~[is.pixel.value{$:/state/sidebar/resizing!!start-story-right}] }}} storyRiverWidth={{{ [add] }}} sidebarWidth={{{ [subtractadd{$:/state/sidebar/resizing!!drag-grip-diff}add[14]] }}}> <%if [{$:/themes/tiddlywiki/vanilla/options/sidebarlayout}match[fixed-fluid]] %> <%if [is.pixel.value{$:/themes/tiddlywiki/vanilla/metrics/storyleft}] %> <> diff --git a/themes/tiddlywiki/vanilla/sidebar-resizer.tid b/themes/tiddlywiki/vanilla/sidebar-resizer.tid index c1217749b..5afaababc 100644 --- a/themes/tiddlywiki/vanilla/sidebar-resizer.tid +++ b/themes/tiddlywiki/vanilla/sidebar-resizer.tid @@ -83,7 +83,7 @@ code-body: yes <%if [{$:/themes/tiddlywiki/vanilla/options/sidebarlayout}match[fixed-fluid]] %> .tc-sidebar-resizer { - left: clamp(calc({{$:/themes/tiddlywiki/vanilla/metrics/storywidth}} - 28px),calc({{$:/themes/tiddlywiki/vanilla/metrics/storyright}} - 28px),calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}} - 28px)); + left: clamp(calc({{$:/themes/tiddlywiki/vanilla/metrics/storywidth}} - 28px),calc({{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} + {{$:/themes/tiddlywiki/vanilla/metrics/storywidth}} - 28px),calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}} - 28px)); } <% else %>