Skip to content

Commit

Permalink
Merge branch 'main' into fix-viewhelper
Browse files Browse the repository at this point in the history
  • Loading branch information
arjxn-py authored Oct 14, 2024
2 parents 39f6648 + 7161608 commit 599484c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/base/src/panelview/formbuilder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const LuminoSchemaForm = (
Widget.detach(widget);
}
} catch (e) {
console.warn('Exception while detaching Lumino widget.', e);
// The widget is destroyed already by React.
}
};
}, [children]);
Expand Down
4 changes: 2 additions & 2 deletions python/jupytercad_core/src/factory.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ConsolePanel, IConsoleTracker } from '@jupyterlab/console';
import {
JupyterCadModel,
IJupyterCadTracker,
IJCadWorkerRegistry,
IJCadExternalCommandRegistry
IJCadExternalCommandRegistry,
IJupyterCadTracker
} from '@jupytercad/schema';
import { ABCWidgetFactory, DocumentRegistry } from '@jupyterlab/docregistry';
import { CommandRegistry } from '@lumino/commands';
Expand Down
8 changes: 8 additions & 0 deletions python/jupytercad_core/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ export const trackerPlugin: JupyterFrontEndPlugin<IJupyterCadTracker> = {
const tracker = new WidgetTracker<JupyterCadWidget>({
namespace: NAME_SPACE
});
tracker.currentChanged.connect(() => {
const currentWidget = tracker.currentWidget;

if (currentWidget) {
const resizeEvent = new Event('resize');
window.dispatchEvent(resizeEvent);
}
});
console.log('jupytercad:core:tracker is activated!');
return tracker;
}
Expand Down

0 comments on commit 599484c

Please sign in to comment.