Skip to content

Commit 61b5ae5

Browse files
committed
Add feature: creating group with selections
1 parent 90817bf commit 61b5ae5

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

client/components/font-manager.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,12 @@ class FontManager {
184184
actionsPanel.addEventListener(ActionsPanel.CREATE, e => {
185185
if (debugEvents) console.log("ActionsPanel.CREATE");
186186
const group = e.detail;
187+
188+
// it items were selected in the fonts panel, add them to the new group
189+
if (fontPanel.selected) {
190+
this.addTypefacesToGroup(fontPanel.selected, group);
191+
}
192+
187193
groupPanel.selectByName(group.name);
188194
editorPanel.edit();
189195
});

client/components/panels/custom-group-panel.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class CustomGroupPanel extends Panel {
2929
}
3030

3131
deleteGroup(groups) {
32-
console.log("delete: deleting node")
32+
3333
if (this.selectedNode) {
3434

3535
const that = this;
@@ -57,7 +57,6 @@ class CustomGroupPanel extends Panel {
5757

5858
animation.onfinish = () => {
5959
node.remove();
60-
console.log("delete: removed node")
6160
}
6261

6362
return animation;

client/components/panels/editor-panel.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ class EditorPanel extends Panel {
77
constructor(parent) {
88
super();
99
this.parent = parent;
10-
console.log(this);
1110
this.group = null
1211

1312
this.editor = new GroupEditor();

0 commit comments

Comments
 (0)