added more ways to bring a comment to the front

pull/95/head
jmoenig 2020-06-15 10:18:11 +02:00
rodzic 9871e323fb
commit a47999814b
2 zmienionych plików z 16 dodań i 3 usunięć

Wyświetl plik

@ -31,7 +31,7 @@
* costumes and sounds of clones are now properly shadowed when modifying them programmatically
* fixed editing cells in multi-page list watchers
* recursive calls to "broadcast and wait" execute smoothly again
* expanding a collapsed comment now brings it to the front
* expanding a collapsed comment or clicking on it now brings it to the front
* **Translation Updates:**
* New Hebrew translation
* Ukranian

Wyświetl plik

@ -12412,18 +12412,31 @@ CommentMorph.prototype.toggleExpand = function () {
this.isCollapsed = !this.isCollapsed;
this.fixLayout();
this.align();
if (!this.isCollapsed && this.parent) {
this.parent.add(this); // come to front
if (!this.isCollapsed) {
this.comeToFront();
}
};
CommentMorph.prototype.comeToFront = function () {
if (this.parent) {
this.parent.add(this);
this.changed();
}
};
// CommentMorph events:
CommentMorph.prototype.mouseClickLeft = function () {
this.comeToFront();
};
// CommentMorph layout:
CommentMorph.prototype.layoutChanged = function () {
// react to a change of the contents area
this.fixLayout();
this.align();
this.comeToFront();
};
CommentMorph.prototype.fixLayout = function () {