Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions sass/editor/_editor-assets-panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -348,13 +348,18 @@
> .pcui-panel-content {
height: 100%;

> .pcui-asset-panel-folders {
> .pcui-asset-panel-left {
flex-shrink: 0;
max-width: 100%;
height: 100%;
border-top: 1px solid $border-primary;

.pcui-treeview-item-icon::after {
content: '\E139';
> .pcui-asset-panel-folders {
height: 100%;

.pcui-treeview-item-icon::after {
content: '\E139';
}
}

// this is to prevent flashing when we drag assets
Expand Down
17 changes: 12 additions & 5 deletions src/editor/assets/asset-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { tooltip, tooltipSimpleItem } from '../../common/tooltips.ts';
import { bytesToHuman, naturalCompare } from '../../common/utils.ts';

const CLASS_ROOT = 'pcui-asset-panel';
const CLASS_LEFT = `${CLASS_ROOT}-left`;
const CLASS_FOLDERS = `${CLASS_ROOT}-folders`;
const CLASS_CURRENT_FOLDER = `${CLASS_ROOT}-current-folder`;
const CLASS_ASSET_HIGHLIGHTED = `${CLASS_ROOT}-highlighted-asset`;
Expand Down Expand Up @@ -416,16 +417,22 @@ class AssetPanel extends Panel {

this._createTooltip('Open Store', btnStore);

// folders tree view
this._containerFolders = new Container({
class: CLASS_FOLDERS,
// resizable container for a scrollable folders container
this._containerLeft = new Container({
class: CLASS_LEFT,
resizable: 'right',
resizeMin: 100,
resizeMax: 600,
width: 200,
width: 200
});
this.append(this._containerLeft);

// folders tree view
this._containerFolders = new Container({
class: CLASS_FOLDERS,
scrollable: true
});
this.append(this._containerFolders);
this._containerLeft.append(this._containerFolders);

this._foldersView = new TreeView({
allowReordering: false,
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"skipLibCheck": true,
"noEmit": true,
"target": "esnext",
"moduleResolution": "bundler",
"moduleResolution": "node",
"outDir": "dist",
"lib": ["es6", "dom", "webworker"]
},
Expand Down