mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-06 22:04:19 +00:00
add dblclick below 500ms to hide sidebar
This commit is contained in:
parent
dfa9a0ab83
commit
c617e28b97
@ -26,7 +26,15 @@ title: $:/core/procedures/sidebar-resizer
|
||||
\end
|
||||
|
||||
\procedure sidebar-resizer-pointerdown-actions()
|
||||
<%if [[$:/state/sidebar/resizing]is[missing]then<event-mousebutton>match[left]] %>
|
||||
<%if [[$:/state/sidebar]get[click-time]subtract<now [UTC]YYYY0MM0DD0hh0mm0ss0XXX>abs[]compare:number:lteq[500]] %>
|
||||
<<sidebar-resizer-pointercancel-actions>>
|
||||
<$action-setfield $tiddler="$:/state/sidebar" text="no"/>
|
||||
<% else %>
|
||||
<%if [[$:/state/sidebar]is[missing]] %>
|
||||
<$action-setfield $tiddler="$:/state/sidebar" text="yes"/>
|
||||
<% endif %>
|
||||
<$action-setfield $tiddler="$:/state/sidebar" click-time=<<now [UTC]YYYY0MM0DD0hh0mm0ss0XXX>>/>
|
||||
<%if [[$:/state/sidebar/resizing]is[missing]then<event-mousebutton>match[left]] %>
|
||||
<$let
|
||||
startStoryLeft={{{ [<storyLeftTiddler>!is[blank]get[text]] :else[get.theme.metric[storyleft]] }}}
|
||||
startStoryRight={{{ [<storyRightTiddler>!is[blank]get[text]] :else[get.theme.metric[storyright]] }}}
|
||||
@ -49,6 +57,7 @@ title: $:/core/procedures/sidebar-resizer
|
||||
story-width-metric={{{ [get.value.metric<startStoryWidth>] }}}
|
||||
/>
|
||||
</$let>
|
||||
<% endif %>
|
||||
<% endif %>
|
||||
\end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user