Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite9ee569

Browse files
authored
Merge pull request#111 from minjk-bl/devops
Hotfix for v2.0.0 (as v2.0.1)
2 parents84361a6 +cbcf98a commite9ee569

File tree

14 files changed

+122
-43
lines changed

14 files changed

+122
-43
lines changed

‎css/boardFrame.css‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@
156156
flex-direction: column;
157157
justify-content: center;
158158
touch-action: none;
159-
cursor: pointer;
160159
color:var(--font-primary);
161160
font-family:'AppleSDGothicNeo';
162161

@@ -180,6 +179,7 @@
180179
overflow: hidden;
181180
border:2px solid transparent;
182181
border-radius:2px;
182+
cursor: pointer;
183183
}
184184
.vp-block-left-holder {
185185
display: none;
@@ -197,6 +197,7 @@
197197
position: absolute;
198198
left:0px;
199199
color:rgba(0,0,0,0.3);
200+
cursor: default;
200201
}
201202
.vp-block-num-info {
202203
color:#828282;

‎css/popupComponent.css‎

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -115,29 +115,29 @@
115115
height:50px;
116116
}
117117
.vp-popup-button[data-type="code"] {
118-
position: absolute;
119-
left:15px;
120-
top:9px;
118+
float: left;
119+
margin-top:9px;
120+
margin-left:10px;
121121
}
122122
.vp-popup-button[data-type="data"] {
123-
position: absolute;
124-
left:102px;
125-
top:9px;
123+
float: left;
124+
margin-top:9px;
125+
margin-left:10px;
126126
}
127127
.vp-popup-button[data-type="cancel"] {
128-
position: absolute;
128+
float: right;
129129
background-color:#E4E4E4;
130-
top:9px;
131-
right:106px;
130+
margin-top:9px;
131+
margin-right:10px;
132132
}
133133
.vp-popup-runadd-box {
134-
position: absolute;
135-
top:9px;
136-
right:15px;
134+
float: right;
137135
width: fit-content;
138136
height:30px;
139137
background:#F38504;
140138
border-radius:2px;
139+
margin-top:9px;
140+
margin-right:10px;
141141
}
142142
.vp-popup-button[data-type="run"] {
143143
display: inline-block;
@@ -157,8 +157,8 @@
157157
background: white;
158158
border:0.25px solidvar(--border-gray-color);
159159
position: absolute;
160-
bottom:35px;
161-
right:0px;
160+
bottom:45px;
161+
right:10px;
162162
width:120px;
163163
text-align: center;
164164
line-height:30px;
@@ -172,10 +172,11 @@
172172
background:var(--light-gray-color);
173173
}
174174
.vp-popup-save-button {
175-
position: absolute;
176-
top:9px;
177-
right:15px;
175+
float: right;
178176
height:30px;
177+
width:100px;
178+
margin-top:9px;
179+
margin-right:10px;
179180
}
180181
/* writable codemirror style*/
181182
/* Code Option Codemirror */

‎data/libraries.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@
384384
"type" :"function",
385385
"level":1,
386386
"name" :"elif",
387-
"tag" :"ELSE,LOGIC",
387+
"tag" :"ELIF,LOGIC",
388388
"path" :"visualpython - logic - control - elif",
389389
"desc" :"elif",
390390
"file" :"m_logic/Elif",

‎data/m_library/pandasLibrary.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5119,7 +5119,7 @@ define([
51195119
name:'Plot',
51205120
library:'pandas',
51215121
description:'create chart',
5122-
code:'${o0} = ${i0}.plot(${v}${etc})',
5122+
code:'${o0} = ${i0}.plot(${v}${etc})\nplt.show()',
51235123
input:[
51245124
{
51255125
name:'i0',

‎html/popupComponent.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
<buttontype="button"class="vp-button vp-popup-button"data-type="code">Code view</button>
5252
<buttontype="button"class="vp-button vp-popup-button"data-type="data">Data view</button>
5353

54-
<buttontype="button"class="vp-button vp-popup-button"data-type="cancel">Cancel</button>
5554
<divclass="vp-popup-runadd-box">
5655
<buttontype="button"class="vp-button activated vp-popup-button"data-type="run"title="Save to block & Run cell">Run</button>
5756
<buttontype="button"class="vp-button activated vp-popup-button"data-type="show-detail"><imgsrc="/nbextensions/visualpython/img/arrow_short_up.svg"/></button>
@@ -60,7 +59,8 @@
6059
<divclass="vp-popup-detail-button"data-type="add"title="Save to block & Add cell">Code to cell</div>
6160
</div>
6261
</div>
63-
<buttontype="button"class="vp-button activated vp-popup-button vp-popup-save-button"data-type="save"title="Save to block"style="display:none;">Save</button>
62+
<buttontype="button"class="vp-button activated vp-popup-button vp-popup-save-button"data-type="save"title="Save to block"style="display:none;">Save to block</button>
63+
<buttontype="button"class="vp-button vp-popup-button"data-type="cancel">Cancel</button>
6464
</div>
6565
</div>
6666
</div>

‎js/board/BlockMenu.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ define([
7474
// run button
7575
sbBlockMenu.appendLine('<div id="vp_block_menu_run" class="vp-block-menu-item">Run</div>');
7676
// add button
77-
sbBlockMenu.appendLine('<div>Add</div>');
77+
sbBlockMenu.appendLine('<div>Code to cell</div>');
7878
// duplicate button
7979
sbBlockMenu.appendLine('<div id="vp_block_menu_duplicate" class="vp-block-menu-item">Duplicate</div>');
8080
// delete button

‎js/com/com_Config.js‎

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,17 @@ define([], function() {
9090
' except ValueError:',
9191
' return 0.0'
9292
]
93-
}
93+
},
94+
'vpimport':[
95+
{library:'numpy',alias:'np'},
96+
{library:'pandas',alias:'pd'},
97+
{library:'matplotlib.pyplot',alias:'plt',
98+
include:[
99+
'%matplotlib inline'
100+
]
101+
},
102+
{library:'seaborn',alias:'sns'}
103+
]
94104
}
95105

96106
this.data={
@@ -165,7 +175,8 @@ define([], function() {
165175
Jupyter.notebook.config.loaded.then(function(){
166176
vardata=Jupyter.notebook.config.data[configKey];
167177
if(data==undefined){
168-
data={};
178+
reject('No data available.');
179+
return;
169180
}
170181
if(dataKey==''){
171182
resolve(data);
@@ -184,7 +195,7 @@ define([], function() {
184195
Jupyter.notebook.config.load();
185196
vardata=Jupyter.notebook.config.data[configKey];
186197
if(data==undefined){
187-
data={};
198+
returnundefined;
188199
}
189200
if(dataKey==''){
190201
returndata;

‎js/com/component/InstanceEditor.js‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,14 @@ define([
433433
if(callback){
434434
callback(varObj);
435435
}
436+
}).catch(function(resultObj){
437+
let{ result}=resultObj;
438+
// show alert
439+
com_util.renderAlertModal(result.ename+': '+result.evalue);
440+
// callback
441+
if(callback){
442+
callback('');
443+
}
436444
});
437445

438446

‎js/com/component/PopupComponent.js‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -435,10 +435,6 @@ define([
435435
}
436436
if(!dataview){
437437
$(this.wrapSelector('.vp-popup-button[data-type="data"]')).hide();
438-
}else{
439-
if(!codeview){
440-
$(this.wrapSelector('.vp-popup-button[data-type="data"]')).css({left:'15px',top:'9px'});
441-
}
442438
}
443439

444440
// footer

‎js/loadVisualpython.js‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,13 @@
238238
if(cfg.vp_section_display&&vpFrame){
239239
vpFrame.openVp();
240240
}
241+
242+
// Operations on kernel restart
243+
events.on('kernel_ready.Kernel',function(evt,info){
244+
vpLog.display(VP_LOG_TYPE.LOG,'vp operations for kernel ready...');
245+
// read vp functions
246+
_readKernelFunction();
247+
});
241248
}
242249

243250
return{initVisualpython:initVisualpython,readConfig:readConfig};

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp