Skip to content

Commit

Permalink
🚨 !HOTFIX!: 툴박스 카테고리가 선택안되는 문제 해결 (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
lee0jae330 authored Dec 5, 2024
1 parent e828e2f commit 2509c70
Showing 1 changed file with 35 additions and 2 deletions.
37 changes: 35 additions & 2 deletions apps/client/src/core/tabbedToolbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,41 @@ export default class TabbedToolbox extends Blockly.Toolbox {
this.contentArea_.innerHTML = '';
}

// eslint-disable-next-line no-unused-vars
protected onClick_(_e: PointerEvent): void {}
protected onClick_(e: PointerEvent): void {
const element = e.target as HTMLElement;
if (element.tagName === 'INPUT') {
return;
}

if (element.textContent === '컨테이너') {
this.setSelectedItem(this.getToolboxItems()![0]);
return;
}
if (element.textContent === '텍스트') {
this.setSelectedItem(this.getToolboxItems()![1]);
return;
}
if (element.textContent === '폼') {
this.setSelectedItem(this.getToolboxItems()![2]);
return;
}
if (element.textContent === '표') {
this.setSelectedItem(this.getToolboxItems()![3]);
return;
}
if (element.textContent === '리스트') {
this.setSelectedItem(this.getToolboxItems()![4]);
return;
}
if (element.textContent === '링크') {
this.setSelectedItem(this.getToolboxItems()![5]);
return;
}
if (element.textContent === '내용') {
this.setSelectedItem(this.getToolboxItems()![6]);
return;
}
}
}

Blockly.Css.register(`
Expand Down

0 comments on commit 2509c70

Please sign in to comment.