From 5a1f2175b231ff763f2a835ef960e74bd2d122ba Mon Sep 17 00:00:00 2001 From: Aayush Raj Date: Fri, 5 Apr 2024 22:39:21 +0530 Subject: [PATCH 1/2] add undo/redo shortcut and idea selection-indicator to LabyrinthJS While linking ideas, no selection-indicator of selected idea was visible thereby creating confusion. Added a selection-indicator to the currently selected idea and auto-deselect after making a link. Signed-off-by: Aayush Raj --- activities/LabyrinthJS.activity/js/activity.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/activities/LabyrinthJS.activity/js/activity.js b/activities/LabyrinthJS.activity/js/activity.js index 2743af72b..ec30ced66 100644 --- a/activities/LabyrinthJS.activity/js/activity.js +++ b/activities/LabyrinthJS.activity/js/activity.js @@ -362,11 +362,18 @@ define(["sugar-web/activity/activity", "l10n", "sugar-web/datastore", "sugar-web if (lastSelected == this) lastSelected = null; return; } else if (currentMode == 1) { + if (isSelectedNode(this)) { + unselectNode(this); + lastSelected = null; + } + else { selectNode(this); } if (lastSelected != null && lastSelected != this) { createEdge(lastSelected, this); + unselectNode(this); + lastSelected = null; pushState(); } - lastSelected = this; + if (isSelectedNode(this)) lastSelected = this; return; } else { if (isSelectedNode(this)) { From 0c6bd8566dbbf957a82edce9c11eda5a5ffb6e38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lionel=20Lask=C3=A9?= Date: Mon, 15 Apr 2024 22:18:18 +0200 Subject: [PATCH 2/2] Update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9464da9ef..33d116908 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Missalignment of icons and text in Fototoon activity "clean all" button #1596 - Extra icon rendering in QRCode activity #1193 - Message Updation in Fraction Activity #1453 +- LabyrinthJS: No selection-indicator is visible while linking ideas #1585 ## [1.8.0] - 2024-04-10 ### Added