Skip to content

Commit 993b830

Browse files
author
minjk-bl
committed
bug fix
1 parent 1e8b723 commit 993b830

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

js/m_ml/modelSelection.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ define([
5757
/** Implement binding events */
5858
var that = this;
5959
// select model
60-
$(this.wrapSelector('#model')).on('click', function() {
60+
$(this.wrapSelector('#model')).on('change', function() {
6161
let model = $(this).val();
6262
that.state.model = model;
6363
$(that.wrapSelector('.vp-model-option-box')).html(that.templateForOption(model));
@@ -102,6 +102,16 @@ define([
102102
});
103103
$(page).find('#model').html(modelTypeTag.toString());
104104

105+
// show install button
106+
if (this.modelConfig[this.state.model].install != undefined) {
107+
$(page).find('#vp_installLibrary').show();
108+
} else {
109+
$(page).find('#vp_installLibrary').hide();
110+
}
111+
112+
// render option page
113+
$(page).find('.vp-model-option-box').html(this.templateForOption(this.state.model));
114+
105115
let varSelector = new VarSelector2(this.wrapSelector(), ['DataFrame', 'List', 'string']);
106116
varSelector.setComponentID('featureData');
107117
varSelector.addClass('vp-state vp-input');
@@ -114,9 +124,6 @@ define([
114124
varSelector.setValue(this.state.targetData);
115125
$(page).find('#targetData').replaceWith(varSelector.toTagString());
116126

117-
// render option page
118-
$(page).find('.vp-model-option-box').html(this.templateForOption(this.state.model));
119-
120127
return page;
121128
}
122129

0 commit comments

Comments
 (0)