Skip to content

Commit b3a9ebd

Browse files
committed
Add "No asset declarations found." message
1 parent da793a7 commit b3a9ebd

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

css/ui.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,12 @@ div.asset_block.asset_highlight {
546546
background: rgba(153, 204, 153, 0.3);
547547
text-decoration: underline;
548548
}
549+
.asset_no_assets {
550+
color: #999;
551+
padding: 2em;
552+
text-align: center;
553+
font-style: italic;
554+
}
549555
.asset_error_msg {
550556
color: #ff6666;
551557
background-color: #330000;

src/ide/views/asseteditor.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,16 @@ export class AssetEditorView implements ProjectView, pixed.EditorContext {
438438
}
439439
});
440440
this.deferrednodes = [];
441+
if (this.maindiv.children().length === 0) {
442+
$('<div class="asset_no_assets"/>')
443+
.text("No asset declarations found.")
444+
.appendTo(this.maindiv);
445+
}
441446
this.scrollToAssetFromHash();
442447
} else {
448+
if (this.rootnodes.length > 0) {
449+
this.maindiv.find('.asset_no_assets').remove();
450+
}
443451
for (var node of this.rootnodes) {
444452
node.refreshRight();
445453
}

0 commit comments

Comments
 (0)