fix: prevent deletion of library procedures
- Skip delete button creation for readonly blocks (data-readonly) - Add WCProcedure.delete() override that guards against readonly
This commit is contained in:
+1
-1
@@ -46,7 +46,7 @@ class WCBlock extends HTMLElement {
|
||||
});
|
||||
|
||||
const isAlgoBlock = !!this.closest("#draw-area");
|
||||
if (!(this instanceof WCStart) && !(this instanceof WCEnd)) {
|
||||
if (!(this instanceof WCStart) && !(this instanceof WCEnd) && !this.dataset.readonly) {
|
||||
const btn = document.createElement("button");
|
||||
btn.className = "delete-btn";
|
||||
btn.textContent = "\u00D7";
|
||||
|
||||
Reference in New Issue
Block a user