svghmi/svghmi.js
branchsvghmi
changeset 2920 3ee337c8c769
parent 2917 c8d923dd707f
child 2921 2670f5c53caf
--- a/svghmi/svghmi.js	Sat Apr 04 17:47:16 2020 +0200
+++ b/svghmi/svghmi.js	Sat Apr 04 22:32:54 2020 +0200
@@ -505,3 +505,20 @@
 
     current_modal = undefined;
 };
+
+function widget_active_activable(eltsub) {
+    if(eltsub.inactive_style === undefined)
+        eltsub.inactive_style = eltsub.inactive.getAttribute("style");
+    eltsub.inactive.setAttribute("style", "display:none");
+    if(eltsub.active_style !== undefined)
+            eltsub.active.setAttribute("style", eltsub.active_style);
+    console.log("active", eltsub);
+};
+function widget_inactive_activable(eltsub) {
+    if(eltsub.active_style === undefined)
+        eltsub.active_style = eltsub.active.getAttribute("style");
+    eltsub.active.setAttribute("style", "display:none");
+    if(eltsub.inactive_style !== undefined)
+            eltsub.inactive.setAttribute("style", eltsub.inactive_style);
+    console.log("inactive", eltsub);
+};