From 99bec2cd88bd7aba3480527c0bc1d0b785dc7dd9 Mon Sep 17 00:00:00 2001 From: Distracting-things Date: Mon, 4 Aug 2025 23:41:52 +0530 Subject: [PATCH 1/2] i have added keypress values for numpad keys and - as well as . which does not need much work for the issue #3 --- app.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index 6ca6267..2a8a386 100644 --- a/app.js +++ b/app.js @@ -933,9 +933,15 @@ angular.module('abTreePractice', ['d3', 'Enums', 'Tree']) valStr = (nodeVal == null) ? '' : nodeVal.toString(); if ((lastKeyDown > 47 && lastKeyDown < 58) // number keys || lastKeyDown == 189 // minus dash - || lastKeyDown == 190) { // decimal point + || lastKeyDown == 190 + //key strok value for numpad and digits are different + || (lastKeyDown >= 96 && lastKeyDown <= 105) + || lastKeyDown == 109 + || lastKeyDown == 110){ // decimal point var leftSlice = valStr.slice(0, valCharIndex), rightSlice = valStr.slice(valCharIndex, valStr.length), + lastKeyDown = (lastKeyDown > 108 && lastKeyDown < 111) ? lastKeyDown - 64: lastKeyDown, //109 is for '-' and 110 is for '.' + lastKeyDown = (lastKeyDown > 95 && lastKeyDown < 106) ? lastKeyDown - 48: lastKeyDown, //96 to 105 for 0 to 9 in numpad lastKeyDown = (lastKeyDown > 188) ? (lastKeyDown - 144) : lastKeyDown, newNum = String.fromCharCode(lastKeyDown); valStr = leftSlice + newNum + rightSlice; From 13ada05714f22a83aa6e6d53d9d875068ae5f3bf Mon Sep 17 00:00:00 2001 From: Distracted-Explorer Date: Tue, 5 Aug 2025 22:42:37 +0530 Subject: [PATCH 2/2] first commit --- app.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app.js b/app.js index 2a8a386..6c68d96 100644 --- a/app.js +++ b/app.js @@ -817,13 +817,13 @@ angular.module('abTreePractice', ['d3', 'Enums', 'Tree']) if (!scope.useAb) { var val; if (d.nodeType == TreeNodeTypeEnum.maxNode) { - val = '≥ ' + d.beta.toString().replace('Infinity', '∞'); + val = 'e ' + d.beta.toString().replace('Infinity', ''); } else if (d.nodeType == TreeNodeTypeEnum.minNode) { - val = '≤ ' + d.alpha.toString().replace('Infinity', '∞'); + val = 'd ' + d.alpha.toString().replace('Infinity', ''); } return 'c ' + val; } - return 'α: ' + d.alpha.toString().replace('Infinity', '∞'); + return '�: ' + d.alpha.toString().replace('Infinity', ''); }); vertex.select('text.beta') .attr('x', function(d) { return d.x + 45 }) @@ -831,7 +831,7 @@ angular.module('abTreePractice', ['d3', 'Enums', 'Tree']) .text(function(d) { if (d.alpha == null || d.beta == null) { return; }; if (!scope.useAb) { return; }; - return 'β: ' + d.beta.toString().replace('Infinity', '∞'); + return '�: ' + d.beta.toString().replace('Infinity', ''); }); // update existing cursor vertex.select('rect.cursor')