From 1924649d974f4a8326f884886465590c72af7c9f Mon Sep 17 00:00:00 2001 From: Paul Elliott Date: Sat, 13 Jul 2024 14:58:13 -0400 Subject: [PATCH 1/2] chore: include src/lib directories in npm package for sourcemap debugging --- packages/element/package.json | 3 ++- packages/transfer-function-editor/package.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/element/package.json b/packages/element/package.json index c898ccb1..3b29b9ac 100644 --- a/packages/element/package.json +++ b/packages/element/package.json @@ -7,7 +7,8 @@ "./*": "./dist/*" }, "files": [ - "dist" + "dist", + "src" ], "scripts": { "dev": "tsc --watch --project tsconfig.build.json & vite", diff --git a/packages/transfer-function-editor/package.json b/packages/transfer-function-editor/package.json index f3b6432b..2f67a1b1 100644 --- a/packages/transfer-function-editor/package.json +++ b/packages/transfer-function-editor/package.json @@ -3,7 +3,8 @@ "version": "1.7.0", "description": "Interface to interactively edit opacity transfer functions", "files": [ - "dist" + "dist", + "lib" ], "type": "module", "exports": { From 48144914bc923ec19db413fcc9fcafa62e4c4600 Mon Sep 17 00:00:00 2001 From: Paul Elliott Date: Sat, 13 Jul 2024 15:27:57 -0400 Subject: [PATCH 2/2] fix(element): subscribe to snapshots from second image actor If setImage was called twice, view-2d-controls-controller did not subscribe to updates from the second image actor. --- packages/element/src/view-2d-controls-controller.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/element/src/view-2d-controls-controller.ts b/packages/element/src/view-2d-controls-controller.ts index 57cb336a..76859b44 100644 --- a/packages/element/src/view-2d-controls-controller.ts +++ b/packages/element/src/view-2d-controls-controller.ts @@ -118,6 +118,7 @@ export class View2dControls implements ReactiveController { const { imageActor } = snapshot.context; if (this.imageActor !== imageActor) { this.imageSubscription?.unsubscribe(); + this.imageSubscription = undefined; } this.imageActor = imageActor; // If imageActor exists and there's no subscription, subscribe to it.