mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-25 08:26:52 +00:00
updates
This commit is contained in:
parent
40a89fc337
commit
b7d542e34b
@ -6,23 +6,6 @@ title: $:/core/macros/sidebar-resizer
|
||||
\procedure sidebar-resizer-pointerdown-actions()
|
||||
<%if [[$:/state/sidebar/resizing]is[missing]then<event-mousebutton>match[left]] %>
|
||||
<$let startPosX=<<event-fromcatcher-posx>> dragGripDiff=<<event-fromselected-posx>> storyRiverWidth={{{ [<event-fromcatcher-posx>subtract<dragGripDiff>subtract[14]add[42]] }}} sidebarWidth={{{ [<tv-widgetnode-width>subtract<event-fromcatcher-posx>add<dragGripDiff>add[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={{{ [<storyRiverWidth>addsuffix[px]] }}}/>
|
||||
<%elseif [is.percentage.value{$:/themes/tiddlywiki/vanilla/metrics/storyright}] %>
|
||||
<$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/metrics/storyright" text={{{ [<storyRiverWidth>divide<tv-widgetnode-width>multiply[100]addsuffix[%]] }}}/>
|
||||
<% else %>
|
||||
<$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/metrics/storyright" text={{{ [<storyRiverWidth>addsuffix[px]] }}}/>
|
||||
<% endif %>
|
||||
<% else %>
|
||||
<%if [is.pixel.value{$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth}] %>
|
||||
<$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth" text={{{ [<sidebarWidth>addsuffix[px]] }}}/>
|
||||
<%elseif [is.percentage.value{$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth}] %>
|
||||
<$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth" text={{{ [<sidebarWidth>divide<tv-widgetnode-width>multiply[100]addsuffix[%]] }}}/>
|
||||
<% else %>
|
||||
<$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth" text={{{ [<sidebarWidth>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=<<dragGripDiff>> widget-node-width=<<tv-widgetnode-width>> start-posx=<<startPosX>> start-story-right={{$:/themes/tiddlywiki/vanilla/metrics/storyright}}/>
|
||||
<$action-setfield $tiddler="$:/state/sidebar/resizing" text="yes" drag-grip-diff=<<dragGripDiff>> drag-grip-diff-right={{{ [<tv-selectednode-width>subtract<dragGripDiff>] }}} widget-node-width=<<tv-widgetnode-width>> start-posx=<<startPosX>> start-story-right={{$:/themes/tiddlywiki/vanilla/metrics/storyright}}/>
|
||||
</$let>
|
||||
<% endif %>
|
||||
\end
|
||||
@ -233,7 +216,7 @@ title: $:/core/macros/sidebar-resizer
|
||||
|
||||
\procedure sidebar-resizer-pointermove-actions()
|
||||
<%if [[$:/state/sidebar/resizing]!is[missing]] %>
|
||||
<$let dragDiff={{{ [<event-fromcatcher-posx>subtract{$:/state/sidebar/resizing!!start-posx}] }}} storyRiverWidth={{{ [<event-fromcatcher-posx>subtract{$:/state/sidebar/resizing!!drag-grip-diff}subtract[14]add[42]] }}} sidebarWidth={{{ [<tv-widgetnode-width>subtract<event-fromcatcher-posx>add{$:/state/sidebar/resizing!!drag-grip-diff}add[14]] }}} widgetNodeWidth={{$:/state/sidebar/resizing!!widget-node-width}}>
|
||||
<$let widgetNodeWidth={{$:/state/sidebar/resizing!!widget-node-width}} dragDiff={{{ [<event-fromcatcher-posx>subtract{$:/state/sidebar/resizing!!start-posx}] }}} startStoryRight={{{ [is.percentage.value{$:/state/sidebar/resizing!!start-story-right}multiply<widgetNodeWidth>divide[100]] ~[is.pixel.value{$:/state/sidebar/resizing!!start-story-right}] }}} storyRiverWidth={{{ [<startStoryRight>add<dragDiff>] }}} sidebarWidth={{{ [<tv-widgetnode-width>subtract<event-fromcatcher-posx>add{$:/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}] %>
|
||||
<<set-storyleft-actions-pixel>>
|
||||
|
@ -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 %>
|
||||
|
Loading…
Reference in New Issue
Block a user