mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-03 12:49:09 +00:00
add dblclick below 500ms to hide sidebar
This commit is contained in:
parent
dfa9a0ab83
commit
c617e28b97
@ -26,6 +26,14 @@ title: $:/core/procedures/sidebar-resizer
|
||||
\end
|
||||
|
||||
\procedure sidebar-resizer-pointerdown-actions()
|
||||
<%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]] }}}
|
||||
@ -50,6 +58,7 @@ title: $:/core/procedures/sidebar-resizer
|
||||
/>
|
||||
</$let>
|
||||
<% endif %>
|
||||
<% endif %>
|
||||
\end
|
||||
|
||||
\procedure sidebar-resizer-pointercancel-actions()
|
||||
|
Loading…
Reference in New Issue
Block a user