skip catalog for grouped objects
This commit is contained in:
parent
068002076c
commit
83bbf16768
2 changed files with 9 additions and 15 deletions
|
|
@ -1335,7 +1335,6 @@
|
|||
return API.platform.load_files(files, undefined);
|
||||
}
|
||||
|
||||
function ck_group() {
|
||||
if (files.length === 1) {
|
||||
API.platform.load_files(files);
|
||||
} else {
|
||||
|
|
@ -1345,15 +1344,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
if (files.length > 5) {
|
||||
UC.confirm(`add ${files.length} objects to workspace?`).then(yes => {
|
||||
if (yes) ck_group();
|
||||
});
|
||||
} else {
|
||||
ck_group();
|
||||
}
|
||||
}
|
||||
|
||||
function loadCatalogFile(e) {
|
||||
API.widgets.load(e.target.getAttribute('load'), function(widget) {
|
||||
platform.add(widget);
|
||||
|
|
|
|||
|
|
@ -139,6 +139,7 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
|||
*/
|
||||
function Widget(id, group) {
|
||||
this.id = id || new Date().getTime().toString(36)+(nextId++);
|
||||
this.grouped = group ? true : false;
|
||||
this.group = group || [];
|
||||
this.group.push(this);
|
||||
if (!this.group.id) {
|
||||
|
|
@ -249,6 +250,9 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
|||
******************************************************************* */
|
||||
|
||||
PRO.saveToCatalog = function(filename) {
|
||||
if (this.grouped) {
|
||||
return this;
|
||||
}
|
||||
let widget = this;
|
||||
let time = UTIL.time();
|
||||
widget.meta.file = filename;
|
||||
|
|
|
|||
Loading…
Reference in a new issue