From f2382e0c500d5bb31ec4fe35edae65b99f73ace7 Mon Sep 17 00:00:00 2001 From: usbsync Date: Tue, 23 Apr 2024 15:44:10 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B9=B4=ED=85=8C=EA=B3=A0=EB=A6=AC=20?= =?UTF-8?q?=EC=84=A0=ED=83=9D=EC=9D=B4=20=EC=9E=90=EC=97=B0=EC=8A=A4?= =?UTF-8?q?=EB=9F=BD=EA=B2=8C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/playground/block_menu.ts | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/src/playground/block_menu.ts b/src/playground/block_menu.ts index dfd8f77dcb..8f5ca5c607 100644 --- a/src/playground/block_menu.ts +++ b/src/playground/block_menu.ts @@ -612,18 +612,11 @@ class BlockMenu extends ModelClass { toggleBlockMenu() { const board = this.workspace.board; const boardView = board.view; - const elem = this._categoryElems[this.lastSelector]; - const className = 'entrySelectedCategory'; - const className2 = 'entryUnSelectedCategory'; if (!boardView.hasClass('folding')) { boardView.addClass('folding'); Entry.playground.resizeHandle_.addClass('folding'); Entry.playground.resizeHandle_.removeClass('unfolding'); - if (elem) { - elem.removeClass(className); - elem.addClass(className2); - } Entry.playground.hideTabs(); this.visible = false; } else { @@ -642,13 +635,6 @@ class BlockMenu extends ModelClass { Entry.windowResized.notify(); }); - if (this.visible) { - if (elem) { - elem.removeClass(className2); - elem.addClass(className); - } - } - this.align(); } @@ -694,12 +680,15 @@ class BlockMenu extends ModelClass { oldView.addClass(className2); } - if (this.visible) { - this._selectedCategoryView = elem; - if (elem) { - elem.removeClass(className2); - elem.addClass(className); - } + if (elem === oldView && !(doNotFold || !this.hasCategory())) { + elem.removeClass(className); + elem.addClass(className2); + } + + this._selectedCategoryView = elem; + if (elem) { + elem.removeClass(className2); + elem.addClass(className); } doNotAlign !== true && this.align();