From ec8b26ebbd73c90390478b1ee224863524806c86 Mon Sep 17 00:00:00 2001 From: MatCat Date: Mon, 15 Mar 2021 20:11:03 -0700 Subject: [PATCH] 0.4.16 Fixed properties window not going away when it should --- README.md | 4 ++++ js/globalfunctions.js | 5 +++++ js/main.js | 2 +- js/rightclickmenu/rightclickmenu.js | 3 +++ js/topmenu/topmenu.js | 4 ++++ 5 files changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cdabd70..3da2622 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,10 @@ LZ-String, Copyright 2013 pieroxy under MIT license https://github.com/pieroxy/l ## Changelog +### 0.4.16 + +* Fixed bug where properties window didn't disappear at certain times when it should + ### 0.4.15 * Prepending ! or ~ (active low) before a pin name will now overline it when displayed on element diff --git a/js/globalfunctions.js b/js/globalfunctions.js index d3ebf21..2a1f8ef 100644 --- a/js/globalfunctions.js +++ b/js/globalfunctions.js @@ -266,6 +266,11 @@ function HideHelp() { helpWindow.style.display = "none"; } +function HidePropertiesWindow() { + let propwin = document.getElementById("PropertiesBox"); + propwin.style.display = "none"; +} + function SaveSettings() { localStorage.setItem("LogicEngineSettings",JSON.stringify(logicEngine.Settings)); console.log("Settings Saved"); diff --git a/js/main.js b/js/main.js index 1f83e33..c0d02c2 100644 --- a/js/main.js +++ b/js/main.js @@ -2,7 +2,7 @@ MatCat BrowserLogic Simulator */ -let Version = "0.4.15"; +let Version = "0.4.16"; let spanVersion = document.getElementById("version"); spanVersion.innerText = Version; diff --git a/js/rightclickmenu/rightclickmenu.js b/js/rightclickmenu/rightclickmenu.js index aa1252d..9626c1b 100644 --- a/js/rightclickmenu/rightclickmenu.js +++ b/js/rightclickmenu/rightclickmenu.js @@ -34,12 +34,15 @@ function RightClickMenuListeners() { logicEngine.Ctx.setTransform(1, 0, 0, 1, 0, 0); logicEngine.Panning.OffsetX = 0; logicEngine.Panning.OffsetY = 0; + HidePropertiesWindow(); + disableSelectedMenus(true); }); let rcm_Delete = document.getElementById("rcm_Delete"); rcm_Delete.addEventListener('click', function (evt) { logicEngine.Key_Press({ctrlKey: false, key: "Delete"}); + HidePropertiesWindow(); disableSelectedMenus(true); }); diff --git a/js/topmenu/topmenu.js b/js/topmenu/topmenu.js index 8dbd4e4..12c29d1 100644 --- a/js/topmenu/topmenu.js +++ b/js/topmenu/topmenu.js @@ -80,6 +80,9 @@ function TopMenuListeners() { logicEngine.Ctx.setTransform(1, 0, 0, 1, 0, 0); logicEngine.Panning.OffsetX = 0; logicEngine.Panning.OffsetY = 0; + HidePropertiesWindow(); + disableSelectedMenus(true); + setTimeout(function () { hideMenus() }, 10); @@ -116,6 +119,7 @@ function TopMenuListeners() { let tfm_Delete = document.getElementById("tfm_Delete"); tfm_Delete.addEventListener('click', function (evt) { logicEngine.Key_Press({ctrlKey: false, key: "Delete"}); + HidePropertiesWindow(); disableSelectedMenus(true); setTimeout(function () { hideMenus()