Fossil SCM
Tapping the Zoom button on a zoomed messages now unzooms it (same as the Close Zoom button).
Commit
24e050a0be0e07c0bb22c042cd77f93109fa3315c4abba4caf995455e8af4f6b
Parent
72d93e8ccfa3181…
2 files changed
+1
-4
+1
-1
+1
-4
| --- src/fossil.page.chat.js | ||
| +++ src/fossil.page.chat.js | ||
| @@ -609,22 +609,19 @@ | ||
| 609 | 609 | /** |
| 610 | 610 | Makes message element eMsg the content of this.e.viewZoom. |
| 611 | 611 | */ |
| 612 | 612 | zoomMessage: function(eMsg){ |
| 613 | 613 | const marker = this.e.zoomMarker; |
| 614 | - if( !eMsg ){ | |
| 614 | + if( !eMsg || eMsg===this.e.zoomedMsg ){ | |
| 615 | 615 | if( this.e.zoomedMsg ){ |
| 616 | 616 | marker.parentNode.insertBefore(this.e.zoomedMsg, marker); |
| 617 | 617 | delete this.e.zoomedMsg; |
| 618 | 618 | } |
| 619 | 619 | this.setCurrentView(this.e.viewMessages); |
| 620 | 620 | return; |
| 621 | 621 | } |
| 622 | 622 | console.log("zoom message",eMsg); |
| 623 | - if( eMsg===this.e.zoomedMsg ){ | |
| 624 | - return; | |
| 625 | - } | |
| 626 | 623 | if( this.e.zoomedMsg ){ |
| 627 | 624 | marker.parentNode.insertBefore(this.e.zoomedMsg, marker); |
| 628 | 625 | } |
| 629 | 626 | this.e.viewMessages.insertBefore(marker, eMsg); |
| 630 | 627 | this.e.zoomContent.appendChild(eMsg); |
| 631 | 628 |
| --- src/fossil.page.chat.js | |
| +++ src/fossil.page.chat.js | |
| @@ -609,22 +609,19 @@ | |
| 609 | /** |
| 610 | Makes message element eMsg the content of this.e.viewZoom. |
| 611 | */ |
| 612 | zoomMessage: function(eMsg){ |
| 613 | const marker = this.e.zoomMarker; |
| 614 | if( !eMsg ){ |
| 615 | if( this.e.zoomedMsg ){ |
| 616 | marker.parentNode.insertBefore(this.e.zoomedMsg, marker); |
| 617 | delete this.e.zoomedMsg; |
| 618 | } |
| 619 | this.setCurrentView(this.e.viewMessages); |
| 620 | return; |
| 621 | } |
| 622 | console.log("zoom message",eMsg); |
| 623 | if( eMsg===this.e.zoomedMsg ){ |
| 624 | return; |
| 625 | } |
| 626 | if( this.e.zoomedMsg ){ |
| 627 | marker.parentNode.insertBefore(this.e.zoomedMsg, marker); |
| 628 | } |
| 629 | this.e.viewMessages.insertBefore(marker, eMsg); |
| 630 | this.e.zoomContent.appendChild(eMsg); |
| 631 |
| --- src/fossil.page.chat.js | |
| +++ src/fossil.page.chat.js | |
| @@ -609,22 +609,19 @@ | |
| 609 | /** |
| 610 | Makes message element eMsg the content of this.e.viewZoom. |
| 611 | */ |
| 612 | zoomMessage: function(eMsg){ |
| 613 | const marker = this.e.zoomMarker; |
| 614 | if( !eMsg || eMsg===this.e.zoomedMsg ){ |
| 615 | if( this.e.zoomedMsg ){ |
| 616 | marker.parentNode.insertBefore(this.e.zoomedMsg, marker); |
| 617 | delete this.e.zoomedMsg; |
| 618 | } |
| 619 | this.setCurrentView(this.e.viewMessages); |
| 620 | return; |
| 621 | } |
| 622 | console.log("zoom message",eMsg); |
| 623 | if( this.e.zoomedMsg ){ |
| 624 | marker.parentNode.insertBefore(this.e.zoomedMsg, marker); |
| 625 | } |
| 626 | this.e.viewMessages.insertBefore(marker, eMsg); |
| 627 | this.e.zoomContent.appendChild(eMsg); |
| 628 |
+1
-1
| --- src/style.chat.css | ||
| +++ src/style.chat.css | ||
| @@ -483,11 +483,11 @@ | ||
| 483 | 483 | overflow: auto; |
| 484 | 484 | } |
| 485 | 485 | body.chat #chat-zoom-content > .message-widget { |
| 486 | 486 | flex-grow: 1; |
| 487 | 487 | } |
| 488 | -body.chat #chat-zoom-content > .message-widget .message-widget-content { | |
| 488 | +body.chat #chat-zoom-content > .message-widget > .message-widget-content { | |
| 489 | 489 | width: 100%; |
| 490 | 490 | } |
| 491 | 491 | body.chat #chat-config #chat-config-options { |
| 492 | 492 | /* /chat config options go here */ |
| 493 | 493 | flex: 1 1 auto; |
| 494 | 494 |
| --- src/style.chat.css | |
| +++ src/style.chat.css | |
| @@ -483,11 +483,11 @@ | |
| 483 | overflow: auto; |
| 484 | } |
| 485 | body.chat #chat-zoom-content > .message-widget { |
| 486 | flex-grow: 1; |
| 487 | } |
| 488 | body.chat #chat-zoom-content > .message-widget .message-widget-content { |
| 489 | width: 100%; |
| 490 | } |
| 491 | body.chat #chat-config #chat-config-options { |
| 492 | /* /chat config options go here */ |
| 493 | flex: 1 1 auto; |
| 494 |
| --- src/style.chat.css | |
| +++ src/style.chat.css | |
| @@ -483,11 +483,11 @@ | |
| 483 | overflow: auto; |
| 484 | } |
| 485 | body.chat #chat-zoom-content > .message-widget { |
| 486 | flex-grow: 1; |
| 487 | } |
| 488 | body.chat #chat-zoom-content > .message-widget > .message-widget-content { |
| 489 | width: 100%; |
| 490 | } |
| 491 | body.chat #chat-config #chat-config-options { |
| 492 | /* /chat config options go here */ |
| 493 | flex: 1 1 auto; |
| 494 |