Skip to content

Commit e8ef427

Browse files
committed
use named export + attach pointermove to window instead of container
1 parent aa822a2 commit e8ef427

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

apps/desktop/src/components/Cropper.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ export type CropperRef = {
230230
animateTo: (real: CropBounds, durationMs?: number) => void;
231231
};
232232

233-
export default function Cropper(
233+
export function Cropper(
234234
props: ParentProps<{
235235
onCropChange?: (bounds: CropBounds) => void;
236236
onInteraction?: (interacting: boolean) => void;
@@ -782,7 +782,7 @@ export default function Cropper(
782782
};
783783

784784
createRoot((dispose) =>
785-
createEventListenerMap(containerRef, {
785+
createEventListenerMap(window, {
786786
pointerup: () => {
787787
setState({ cursorStyle: null, resizing: false });
788788
// Note: may need to be added back

apps/desktop/src/routes/capture-area.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import { type as ostype } from "@tauri-apps/plugin-os";
1111
import { createMemo, createSignal, onCleanup, onMount, Show } from "solid-js";
1212
import { createStore, reconcile } from "solid-js/store";
1313
import { Transition } from "solid-transition-group";
14-
import Cropper, {
14+
import {
15+
Cropper,
1516
CROP_ZERO,
1617
type CropBounds,
1718
type CropperRef,

apps/desktop/src/routes/editor/Editor.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ import {
1818
} from "solid-js";
1919
import { createStore } from "solid-js/store";
2020
import { Transition } from "solid-transition-group";
21-
import Cropper, {
21+
import {
22+
Cropper,
2223
CROP_ZERO,
2324
type CropBounds,
2425
type CropperRef,

apps/desktop/src/routes/target-select-overlay.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ import {
2424
Switch,
2525
} from "solid-js";
2626
import { createStore, reconcile } from "solid-js/store";
27-
import Cropper, {
27+
import {
28+
Cropper,
2829
CROP_ZERO,
2930
type CropBounds,
3031
type CropperRef,

0 commit comments

Comments
 (0)