@bian-womp/spark-workbench 0.3.63 → 0.3.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.cjs
CHANGED
|
@@ -416,8 +416,9 @@ class InMemoryWorkbench extends AbstractWorkbench {
|
|
|
416
416
|
setViewport(viewport) {
|
|
417
417
|
if (lod.isEqual(this.viewport, viewport))
|
|
418
418
|
return;
|
|
419
|
+
const init = this.viewport === null;
|
|
419
420
|
this.viewport = { ...viewport };
|
|
420
|
-
this.emit("graphUiChanged", { change: { type: "viewport" } });
|
|
421
|
+
this.emit("graphUiChanged", { change: { type: "viewport" }, init });
|
|
421
422
|
}
|
|
422
423
|
getViewport() {
|
|
423
424
|
return this.viewport ? { ...this.viewport } : null;
|
|
@@ -1687,7 +1688,7 @@ class RemoteGraphRunner extends AbstractGraphRunner {
|
|
|
1687
1688
|
this.clientPromise = promise = (async () => {
|
|
1688
1689
|
// Build client config from backend config
|
|
1689
1690
|
const clientConfig = this.buildClientConfig(backend);
|
|
1690
|
-
// Wrap custom event handler to intercept
|
|
1691
|
+
// Wrap custom event handler to intercept viewport events and emit viewport event
|
|
1691
1692
|
const wrappedOnCustomEvent = (event) => {
|
|
1692
1693
|
const msg = event?.message;
|
|
1693
1694
|
if (msg &&
|