Let Groups remember open state in project files

Fix theme export bug in web app
This commit is contained in:
JannisX11 2021-04-23 16:58:52 +02:00
parent 80bbc9fb04
commit 78552a2040
2 changed files with 2 additions and 2 deletions

View File

@ -247,7 +247,7 @@ Object.assign(Blockbench, {
resource_id
*/
if (Blockbench.isWeb) {
var file_name = options.name;
var file_name = options.name || 'file';
if (options.extensions && file_name.substr(-options.extensions[0].length) != options.extensions[0]) {
file_name += '.' + options.extensions[0];
}
@ -257,7 +257,6 @@ Object.assign(Blockbench, {
} else {
if (options.savetype === 'image') {
console.log(options, file_name)
saveAs(options.content, file_name, {})
} else if (options.savetype === 'zip' || options.savetype === 'buffer' || options.savetype === 'binary') {

View File

@ -360,6 +360,7 @@ class Group extends OutlinerNode {
base_group.visibility = this.visibility;
base_group.export = this.export;
base_group.autouv = this.autouv;
base_group.isOpen = this.isOpen;
return base_group;
}
compile(undo) {