Fix remaining known Svelte UI regressions

Closes #1040
This commit is contained in:
Keavon Chambers
2023-03-20 21:26:33 -07:00
parent 9c10d18308
commit bfbabbc4dc
17 changed files with 62 additions and 69 deletions
@@ -100,8 +100,9 @@
async function onEditLayerName(listing: LayerListingInfo) {
if (listing.editingName) return;
listing.editingName = true;
draggable = false;
listing.editingName = true;
layers = layers;
await tick();
@@ -117,6 +118,7 @@
const name = (e.target as HTMLInputElement | undefined)?.value;
listing.editingName = false;
layers = layers;
if (name) editor.instance.setLayerName(listing.entry.path, name);
}
@@ -124,6 +126,7 @@
draggable = true;
listing.editingName = false;
layers = layers;
await tick();
window.getSelection()?.removeAllRanges();
@@ -211,7 +214,7 @@
});
}
markerHeight -= (treeOffset || 0);
markerHeight -= treeOffset || 0;
return {
select,
@@ -38,6 +38,8 @@
let searchTerm = "";
let nodeListLocation: { x: number; y: number } | undefined = undefined;
$: watchNodes($nodeGraph.nodes);
$: gridSpacing = calculateGridSpacing(transform.scale);
$: dotRadius = 1 + Math.floor(transform.scale - 0.5 + 0.001) / 2;
$: nodeGraphBarLayout = $nodeGraph.nodeGraphBarLayout;
@@ -47,8 +49,6 @@
$: linkPathInProgress = createLinkPathInProgress(linkInProgressFromConnector, linkInProgressToConnector);
$: linkPaths = createLinkPaths(linkPathInProgress, nodeLinkPaths);
$: watchNodes($nodeGraph.nodes);
function calculateGridSpacing(scale: number): number {
const dense = scale * GRID_SIZE;
let sparse = dense;