A vibe coded tangled fork which supports pijul.

appview/pages/templates/fragments/resizeable: add resize on double click

Signed-off-by: eti <eti@eti.tf>

authored by

eti and committed by tangled.org 3f9d23a5 d8a96437

+9
+9
appview/pages/templates/fragments/resizeable.html
··· 15 15 this.handleMouseDown = this.handleMouseDown.bind(this); 16 16 this.handleMouseMove = this.handleMouseMove.bind(this); 17 17 this.handleMouseUp = this.handleMouseUp.bind(this); 18 + this.handleDoubleClick = this.handleDoubleClick.bind(this); 18 19 19 20 this.init(); 20 21 } 21 22 22 23 init() { 23 24 this.resizer.addEventListener('mousedown', this.handleMouseDown); 25 + this.resizer.addEventListener('dblclick', this.handleDoubleClick); 24 26 } 25 27 26 28 handleMouseDown(e) { ··· 86 88 document.removeEventListener('mouseup', this.handleMouseUp); 87 89 } 88 90 91 + handleDoubleClick(e) { 92 + e.preventDefault(); 93 + this.target.style.width = ''; 94 + this.target.style.flexShrink = ''; 95 + } 96 + 89 97 destroy() { 90 98 this.resizer.removeEventListener('mousedown', this.handleMouseDown); 99 + this.resizer.removeEventListener('dblclick', this.handleDoubleClick); 91 100 document.removeEventListener('mousemove', this.handleMouseMove); 92 101 document.removeEventListener('mouseup', this.handleMouseUp); 93 102 }