mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-04 01:38:11 +08:00
Fix eyedropper tool
This commit is contained in:
committed by
Keavon Chambers
parent
0d6bec837b
commit
40aab0332a
@@ -159,6 +159,7 @@
|
|||||||
|
|
||||||
export function updateDocumentTransform(transform: string) {
|
export function updateDocumentTransform(transform: string) {
|
||||||
artworkTransform = transform;
|
artworkTransform = transform;
|
||||||
|
rasterizedCanvas = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function updateEyedropperSamplingState(mousePosition: XY | undefined, colorPrimary: string, colorSecondary: string): Promise<[number, number, number] | undefined> {
|
export async function updateEyedropperSamplingState(mousePosition: XY | undefined, colorPrimary: string, colorSecondary: string): Promise<[number, number, number] | undefined> {
|
||||||
@@ -180,7 +181,7 @@
|
|||||||
const outsideArtboardsColor = getComputedStyle(window.document.documentElement).getPropertyValue("--color-2-mildblack");
|
const outsideArtboardsColor = getComputedStyle(window.document.documentElement).getPropertyValue("--color-2-mildblack");
|
||||||
const outsideArtboards = `<rect x="0" y="0" width="100%" height="100%" fill="${outsideArtboardsColor}" />`;
|
const outsideArtboards = `<rect x="0" y="0" width="100%" height="100%" fill="${outsideArtboardsColor}" />`;
|
||||||
const artboards = artboardSvg;
|
const artboards = artboardSvg;
|
||||||
const artwork = artworkSvg;
|
const artwork = `<g id="transform-group" transform="${artworkTransform}">${nodeRenderSvg}</g>`;
|
||||||
const svg = `
|
const svg = `
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}">${outsideArtboards}${artboards}${artwork}</svg>
|
<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}">${outsideArtboards}${artboards}${artwork}</svg>
|
||||||
`.trim();
|
`.trim();
|
||||||
|
|||||||
Reference in New Issue
Block a user