enhance image saving

This commit is contained in:
Vladimir Mandic
2023-06-01 15:44:38 -04:00
parent 364df7036e
commit 02c9640fa5
11 changed files with 50 additions and 58 deletions
-4
View File
@@ -79,16 +79,12 @@ function keyupEditAttention(event) {
weight = parseFloat(weight.toPrecision(12));
if (String(weight).length === 1) weight += '.0';
console.log('HERE', closeCharacter, weight);
if (closeCharacter == ')' && weight == 1) {
console.log('HERE2');
text = text.slice(0, selectionStart - 1) + text.slice(selectionStart, selectionEnd) + text.slice(selectionEnd + 5);
selectionStart--;
selectionEnd--;
console.log('HERE2', text);
} else {
text = text.slice(0, selectionEnd + 1) + weight + text.slice(selectionEnd + 1 + end - 1);
console.log('HERE3', text);
}
target.focus();