Use points from tasks.json
removes annoying flashing of tooltip (and annoying network requests) fix #38
This commit is contained in:
parent
94f74b7016
commit
222e4f8e4b
1 changed files with 3 additions and 10 deletions
|
@ -202,6 +202,8 @@ import TaskDetailEditor from "./TaskDetailEditor.svelte";
|
||||||
tooltipBoxHeight = bbox.height + 5 + 5;
|
tooltipBoxHeight = bbox.height + 5 + 5;
|
||||||
}
|
}
|
||||||
$: {
|
$: {
|
||||||
|
tooltipMaxPoints = null;
|
||||||
|
tooltipCurrPoints = null;
|
||||||
if (hoveredTask != null) {
|
if (hoveredTask != null) {
|
||||||
const status = $taskStatuses.get(hoveredTask.id);
|
const status = $taskStatuses.get(hoveredTask.id);
|
||||||
if (status) {
|
if (status) {
|
||||||
|
@ -209,18 +211,9 @@ import TaskDetailEditor from "./TaskDetailEditor.svelte";
|
||||||
tooltipCurrPoints = status.points;
|
tooltipCurrPoints = status.points;
|
||||||
}
|
}
|
||||||
else if (hoveredTask.type == 'open-data') {
|
else if (hoveredTask.type == 'open-data') {
|
||||||
const id = hoveredTask.id;
|
tooltipMaxPoints = hoveredTask.points
|
||||||
grabAssignment(hoveredTask.taskReference).then(e => {
|
|
||||||
if (hoveredTask?.id == id) {
|
|
||||||
tooltipMaxPoints = e.points
|
|
||||||
resizeTooltipBox()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
resizeTooltipBox();
|
resizeTooltipBox();
|
||||||
} else {
|
|
||||||
tooltipMaxPoints = null;
|
|
||||||
tooltipCurrPoints = null;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Reference in a new issue