Skip to content

Commit b2dec66

Browse files
authored
Merge pull request #86 from minjk-bl/devops
Hotfix
2 parents a8f1195 + 1c34e3b commit b2dec66

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

src/api_block/init.js

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -303,14 +303,22 @@ define([
303303

304304
var createdBlock = blockContainer.getSelectBlock();
305305
if (createdBlock) {
306-
// apply to original block
307-
createdBlock.setState({
308-
apps: {
309-
menu: blockContainer.apps,
310-
code: code,
311-
state: state
312-
}
313-
});
306+
if (title === 'Snippets') {
307+
// set code
308+
createdBlock.setState({
309+
[STATE_codeLine]: code
310+
});
311+
} else if (title === 'Import' || title === 'Variables' || title === 'File'
312+
|| title === 'Instance' || title === 'Chart') {
313+
// apply to original block
314+
createdBlock.setState({
315+
apps: {
316+
menu: blockContainer.apps,
317+
code: code,
318+
state: state
319+
}
320+
});
321+
}
314322
createdBlock.saveState();
315323
} else {
316324
if (title === 'Snippets') {

src/common/vpFrameEditor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ define([
563563
var suggestInput = new vpSuggestInputText.vpSuggestInputText();
564564
suggestInput.setComponentID('vp_popupAddApply');
565565
suggestInput.addClass('vp-input vp-popup-apply-lambda');
566-
suggestInput.setSuggestList(function() { return ['x', 'min(x)', 'max(x)', 'sum(x)', 'mean(x)']; });
566+
suggestInput.setSuggestList(function() { return ['x']; });
567567
suggestInput.setValue('x');
568568
suggestInput.setNormalFilter(false);
569569
content.appendFormatLine('<td>{0}</td>', suggestInput.toTagString());

src/file_io/udf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ define([
220220
' return 0.0',
221221
' else:',
222222
' try:',
223-
' result = float(x)',
223+
' result = float(x)',
224224
' return result',
225225
' except ValueError:',
226226
' return 0.0'

0 commit comments

Comments
 (0)