Fossil SCM
Restrict pikchr svg/source toggle to clicks, per forum feedback.
Commit
4e757d8c4872802291ff9352002d9d03b6fb3d965c52927afaed675baaccd1c1
Parent
b07834b386f02f7…
1 file changed
+9
-7
+9
-7
| --- src/fossil.pikchr.js | ||
| +++ src/fossil.pikchr.js | ||
| @@ -155,17 +155,19 @@ | ||
| 155 | 155 | Toggle the buttons on only when the mouse is in the parent |
| 156 | 156 | widget's area or the user taps on that area. This seems much |
| 157 | 157 | less "busy" than having them always visible and slightly in the way. |
| 158 | 158 | It also means that we can make them a bit larger. |
| 159 | 159 | */ |
| 160 | - parent.addEventListener('mouseenter', function(ev){ | |
| 161 | - if(ev.target === parent) D.removeClass(buttons, 'hidden'); | |
| 162 | - }, true); | |
| 163 | - parent.addEventListener('mouseleave', function(ev){ | |
| 164 | - if(ev.target === parent) D.addClass(buttons, 'hidden'); | |
| 165 | - }, true); | |
| 166 | - /* mouseenter/leave work well... but only if there's a mouse. */ | |
| 160 | + if(0){ /* Mouse enter/leave triggers currently disabled by request */ | |
| 161 | + parent.addEventListener('mouseenter', function(ev){ | |
| 162 | + if(ev.target === parent) D.removeClass(buttons, 'hidden'); | |
| 163 | + }, true); | |
| 164 | + parent.addEventListener('mouseleave', function(ev){ | |
| 165 | + if(ev.target === parent) D.addClass(buttons, 'hidden'); | |
| 166 | + }, true); | |
| 167 | + /* mouseenter/leave work well... but only if there's a mouse. */ | |
| 168 | + } | |
| 167 | 169 | parent.addEventListener('click', function(ev){ |
| 168 | 170 | ev.preventDefault(); |
| 169 | 171 | ev.stopPropagation(); |
| 170 | 172 | D.toggleClass(buttons, 'hidden'); |
| 171 | 173 | }, false); |
| 172 | 174 |
| --- src/fossil.pikchr.js | |
| +++ src/fossil.pikchr.js | |
| @@ -155,17 +155,19 @@ | |
| 155 | Toggle the buttons on only when the mouse is in the parent |
| 156 | widget's area or the user taps on that area. This seems much |
| 157 | less "busy" than having them always visible and slightly in the way. |
| 158 | It also means that we can make them a bit larger. |
| 159 | */ |
| 160 | parent.addEventListener('mouseenter', function(ev){ |
| 161 | if(ev.target === parent) D.removeClass(buttons, 'hidden'); |
| 162 | }, true); |
| 163 | parent.addEventListener('mouseleave', function(ev){ |
| 164 | if(ev.target === parent) D.addClass(buttons, 'hidden'); |
| 165 | }, true); |
| 166 | /* mouseenter/leave work well... but only if there's a mouse. */ |
| 167 | parent.addEventListener('click', function(ev){ |
| 168 | ev.preventDefault(); |
| 169 | ev.stopPropagation(); |
| 170 | D.toggleClass(buttons, 'hidden'); |
| 171 | }, false); |
| 172 |
| --- src/fossil.pikchr.js | |
| +++ src/fossil.pikchr.js | |
| @@ -155,17 +155,19 @@ | |
| 155 | Toggle the buttons on only when the mouse is in the parent |
| 156 | widget's area or the user taps on that area. This seems much |
| 157 | less "busy" than having them always visible and slightly in the way. |
| 158 | It also means that we can make them a bit larger. |
| 159 | */ |
| 160 | if(0){ /* Mouse enter/leave triggers currently disabled by request */ |
| 161 | parent.addEventListener('mouseenter', function(ev){ |
| 162 | if(ev.target === parent) D.removeClass(buttons, 'hidden'); |
| 163 | }, true); |
| 164 | parent.addEventListener('mouseleave', function(ev){ |
| 165 | if(ev.target === parent) D.addClass(buttons, 'hidden'); |
| 166 | }, true); |
| 167 | /* mouseenter/leave work well... but only if there's a mouse. */ |
| 168 | } |
| 169 | parent.addEventListener('click', function(ev){ |
| 170 | ev.preventDefault(); |
| 171 | ev.stopPropagation(); |
| 172 | D.toggleClass(buttons, 'hidden'); |
| 173 | }, false); |
| 174 |