File tree Expand file tree Collapse file tree 4 files changed +23
-19
lines changed Expand file tree Collapse file tree 4 files changed +23
-19
lines changed Original file line number Diff line number Diff line change @@ -4,26 +4,26 @@ import {
4
4
DocumentModel
5
5
} from '@jupyterlab/docregistry' ;
6
6
7
- import { UrdfWidget , UrdfPanel } from './widget' ;
7
+ import { URDFWidget , URDFPanel } from './widget' ;
8
8
9
9
/**
10
- * A widget factory to create new instances of UrdfWidgets
10
+ * A widget factory to create new instances of URDFWidgets
11
11
*/
12
- export class UrdfWidgetFactory extends ABCWidgetFactory <
13
- UrdfWidget ,
12
+ export class URDFWidgetFactory extends ABCWidgetFactory <
13
+ URDFWidget ,
14
14
DocumentModel
15
15
> {
16
16
constructor ( options : DocumentRegistry . IWidgetFactoryOptions ) {
17
17
super ( options ) ;
18
18
}
19
19
20
- // Create new UrdfWidget given a context (file info)
20
+ // Create new URDFWidget given a context (file info)
21
21
protected createNewWidget (
22
22
context : DocumentRegistry . IContext < DocumentModel >
23
- ) : UrdfWidget {
24
- return new UrdfWidget ( {
23
+ ) : URDFWidget {
24
+ return new URDFWidget ( {
25
25
context,
26
- content : new UrdfPanel ( context )
26
+ content : new URDFPanel ( context )
27
27
} ) ;
28
28
}
29
29
}
Original file line number Diff line number Diff line change @@ -20,9 +20,9 @@ import { Menu } from '@lumino/widgets';
20
20
21
21
import { Token } from '@lumino/coreutils' ;
22
22
23
- import { UrdfWidget } from './widget' ;
23
+ import { URDFWidget } from './widget' ;
24
24
25
- import { UrdfWidgetFactory } from './factory' ;
25
+ import { URDFWidgetFactory } from './factory' ;
26
26
27
27
import { urdf_icon } from './icons' ;
28
28
@@ -33,7 +33,7 @@ import { IEditorLanguageRegistry } from '@jupyterlab/codemirror';
33
33
const FACTORY = 'URDF Widget Factory' ;
34
34
35
35
// Export token so other extensions can require it
36
- export const IUrdfTracker = new Token < IWidgetTracker < UrdfWidget > > (
36
+ export const IURDFTracker = new Token < IWidgetTracker < URDFWidget > > (
37
37
'urdf-tracker'
38
38
) ;
39
39
@@ -65,7 +65,7 @@ const extension: JupyterFrontEndPlugin<void> = {
65
65
66
66
// Tracker
67
67
const namespace = 'jupyterlab-urdf' ;
68
- const tracker = new WidgetTracker < UrdfWidget > ( { namespace } ) ;
68
+ const tracker = new WidgetTracker < URDFWidget > ( { namespace } ) ;
69
69
70
70
// State restoration: reopen document if it was open previously
71
71
if ( restorer ) {
@@ -80,7 +80,7 @@ const extension: JupyterFrontEndPlugin<void> = {
80
80
}
81
81
82
82
// Create widget factory so that manager knows about widget
83
- const widgetFactory = new UrdfWidgetFactory ( {
83
+ const widgetFactory = new URDFWidgetFactory ( {
84
84
name : FACTORY ,
85
85
fileTypes : [ 'urdf' ] ,
86
86
defaultFor : [ 'urdf' ]
Original file line number Diff line number Diff line change @@ -79,6 +79,10 @@ export class URDFLoadingManager extends LoadingManager {
79
79
}
80
80
}
81
81
82
+ dispose ( ) : void {
83
+ this . _robotModel = { } as URDFRobot ;
84
+ }
85
+
82
86
get robotModel ( ) {
83
87
return this . _robotModel ;
84
88
}
Original file line number Diff line number Diff line change @@ -13,10 +13,10 @@ import { Signal } from '@lumino/signaling';
13
13
import { URDFLayout } from './layout' ;
14
14
15
15
/**
16
- * UrdfWidget : widget that represents the view for a urdf (file).
16
+ * URDFWidget : widget that represents the view for a urdf (file).
17
17
*/
18
- export class UrdfWidget extends DocumentWidget < UrdfPanel , DocumentModel > {
19
- constructor ( options : DocumentWidget . IOptions < UrdfPanel , DocumentModel > ) {
18
+ export class URDFWidget extends DocumentWidget < URDFPanel , DocumentModel > {
19
+ constructor ( options : DocumentWidget . IOptions < URDFPanel , DocumentModel > ) {
20
20
super ( options ) ;
21
21
}
22
22
@@ -28,13 +28,13 @@ export class UrdfWidget extends DocumentWidget<UrdfPanel, DocumentModel> {
28
28
}
29
29
30
30
/**
31
- * UrdfPanel : widget that contains the main view of the UrdfWidget .
31
+ * URDFPanel : widget that contains the main view of the URDFWidget .
32
32
*/
33
- export class UrdfPanel extends Panel {
33
+ export class URDFPanel extends Panel {
34
34
private _context : DocumentRegistry . IContext < DocumentModel > ;
35
35
36
36
/**
37
- * Construct a UrdfPanel
37
+ * Construct a URDFPanel
38
38
*
39
39
* @param context - The documents context
40
40
*/
You can’t perform that action at this time.
0 commit comments