File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ .vp-mg-container {
2+ width : 700px ;
3+ height : 550px ;
4+ }
Original file line number Diff line number Diff line change @@ -62,8 +62,6 @@ define([
6262
6363 this . previewOpened = false ;
6464 this . codepreview = undefined ;
65-
66- this . state = { } ;
6765 }
6866
6967 //====================================================================
@@ -116,17 +114,29 @@ define([
116114 $ ( this . _wrapSelector ( ) ) . remove ( ) ;
117115 }
118116
119- init ( ) {
120- vpCommon . loadCss ( Jupyter . notebook . base_url + vpConst . BASE_PATH + vpConst . STYLE_PATH + 'common/popupPage.css' ) ;
117+ init ( state = undefined ) {
118+ this . state = {
121119
122- this . render ( ) ;
120+ }
121+
122+ // load state
123+ if ( state ) {
124+ this . state = {
125+ ...this . state ,
126+ ...state
127+ } ;
128+ }
129+
123130 this . bindEvent ( ) ;
131+ this . render ( ) ;
132+ vpCommon . loadCssForDiv ( this . _wrapSelector ( ) , Jupyter . notebook . base_url + vpConst . BASE_PATH + vpConst . STYLE_PATH + 'common/popupPage.css' ) ;
133+ vpCommon . loadCssForDiv ( this . _wrapSelector ( ) , Jupyter . notebook . base_url + vpConst . BASE_PATH + vpConst . STYLE_PATH + 'common/merge.css' ) ;
124134 }
125135
126136 render ( ) {
127137 var page = new sb . StringBuilder ( ) ;
128138 page . appendFormatLine ( '<div class="{0} {1}">' , APP_PREFIX , this . uuid ) ;
129- page . appendFormatLine ( '<div class="{0}">' , APP_CONTAINER ) ;
139+ page . appendFormatLine ( '<div class="{0} {1} ">' , APP_CONTAINER , 'vp-mg-container' ) ;
130140
131141 // title
132142 page . appendFormat ( '<div class="{0}">{1}</div>' ,
You can’t perform that action at this time.
0 commit comments