Skip to content

Commit ca9bdd2

Browse files
committed
#659 fix show/hide components palette
1 parent a972616 commit ca9bdd2

File tree

2 files changed

+3
-24
lines changed

2 files changed

+3
-24
lines changed

packages/project-editor/project/project.tsx

-19
Original file line numberDiff line numberDiff line change
@@ -2040,25 +2040,6 @@ export class Project extends EezObject {
20402040
LayoutModels.PROPERTIES_TAB_ID,
20412041
settingsController.showComponentsPaletteInProjectEditor
20422042
);
2043-
2044-
// make sure Properties tab width is not 0
2045-
const propertiesNode = this._store.layoutModels.rootEditor.getNodeById(
2046-
LayoutModels.PROPERTIES_TAB_ID
2047-
);
2048-
if (propertiesNode) {
2049-
const rect = propertiesNode.getRect();
2050-
if (rect.width == 0) {
2051-
const parent = propertiesNode.getParent();
2052-
if (parent) {
2053-
this._store.layoutModels.rootEditor.doAction(
2054-
FlexLayout.Actions.updateNodeAttributes(
2055-
parent.getId(),
2056-
{ width: 420 }
2057-
)
2058-
);
2059-
}
2060-
}
2061-
}
20622043
}
20632044

20642045
get missingExtensions() {

packages/project-editor/store/layout-models.tsx

+3-5
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,7 @@ export class LayoutModels extends AbstractLayoutModels {
387387
children: [
388388
{
389389
type: "row",
390-
weight: 0,
391-
width: 350,
390+
weight: 15,
392391
children: [
393392
{
394393
type: "tabset",
@@ -433,16 +432,15 @@ export class LayoutModels extends AbstractLayoutModels {
433432
},
434433
{
435434
type: "tabset",
436-
weight: 100,
435+
weight: 65,
437436
enableDeleteWhenEmpty: false,
438437
enableClose: false,
439438
id: LayoutModels.EDITOR_MODE_EDITORS_TABSET_ID,
440439
children: []
441440
},
442441
{
443442
type: "row",
444-
weight: 0,
445-
width: 420,
443+
weight: 20,
446444
children: [
447445
{
448446
type: "tabset",

0 commit comments

Comments
 (0)