mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-03 03:38:11 +08:00
Fix Eyedropper tool and make Svelte's bind:this more robust
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
export let mediumDivisions = 5;
|
||||
export let minorDivisions = 2;
|
||||
|
||||
let canvasRuler: HTMLDivElement;
|
||||
let canvasRuler: HTMLDivElement | undefined;
|
||||
let rulerLength = 0;
|
||||
let svgBounds = { width: "0px", height: "0px" };
|
||||
|
||||
@@ -76,6 +76,8 @@
|
||||
}
|
||||
|
||||
export function resize() {
|
||||
if (!canvasRuler) return;
|
||||
|
||||
const isVertical = direction === "Vertical";
|
||||
|
||||
const newLength = isVertical ? canvasRuler.clientHeight : canvasRuler.clientWidth;
|
||||
|
||||
Reference in New Issue
Block a user