fix space bug

main
jerl 2024-04-26 18:46:00 -07:00
parent b3c461f394
commit 51f4536424
2 changed files with 14 additions and 0 deletions

View File

@ -172,6 +172,7 @@
}
.span {
position: absolute;
white-space: nowrap;
}
</style>
</head>

View File

@ -17,7 +17,15 @@ function mousemove(event) {
save(dragging);
}
let saving;
let queue;
function save(span) {
if (saving) {
queue = span;
return;
}
saving = true;
window.emit('save_span', {
thread: spaceId,
id: span.id ? span.id.slice(4) : '',
@ -30,6 +38,11 @@ function save(span) {
console.log('span save failed: ' + msg.message);
if (!span.id)
span.id = 'span' + msg.id;
saving = false;
if (queue) {
save(queue);
queue = null;
}
});
}