Skip to content

Commit 8645c2a

Browse files
author
minjk-bl
committed
prepare Apps > Merge
1 parent bd5ae46 commit 8645c2a

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

css/common/merge.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.vp-mg-container {
2+
width: 700px;
3+
height: 550px;
4+
}

src/common/vpMerge.js

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff 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>',

0 commit comments

Comments
 (0)