add option to c-operation-list to set op-list to isCloneable to recipe

This commit is contained in:
Robin Scholtes 2023-07-25 14:54:43 +12:00
parent 8ebce91834
commit 1fc5ca641d

View file

@ -14,16 +14,19 @@ export class COperationList extends HTMLElement {
app,
opNames,
includeStarIcon,
isSortable = false,
isCloneable = true,
icon,
isSortable = false
) {
super();
this.app = app;
this.opNames = opNames;
this.includeStarIcon = includeStarIcon;
this.icon = icon;
this.isSortable = isSortable;
this.isCloneable = isCloneable;
this.icon = icon;
}
/**
@ -66,10 +69,17 @@ export class COperationList extends HTMLElement {
}
}.bind(this),
});
} else if (!this.app.isMobileView() && this.isCloneable) {
const cloneableList = Sortable.create(ul, {
group: {
name: "recipe",
pull: "clone",
},
draggable: "c-operation-li",
sort: false
})
}
ul.dispatchEvent(this.app.manager.oplistcreate);
this.append(ul);
}
}