Skip to content

Commit

Permalink
more hintview patching
Browse files Browse the repository at this point in the history
  • Loading branch information
misfir3 committed May 3, 2018
1 parent 089dd56 commit 186f24f
Showing 1 changed file with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,7 @@ define(['jquery',
this.lessonContentView.model = this.lessonContent;
this.lessonContentView.render();
//TODO: consider moving hintView as child of lessonContentView ...
if (this.lessonHintView) {
this.lessonHintView.stopListening();
this.lessonHintView = null;
}
this.lessonHintView = new HintView();
this.createLessonHintView();

//TODO: instantiate model with values (not sure why was not working before)
var paramModel = new ParamModel({});
Expand All @@ -146,11 +142,23 @@ define(['jquery',
this.lessonProgressModel.completed();
};

this.createLessonHintView = function () {
if (this.lessonHintView) {
this.lessonHintView.stopListening();
this.lessonHintView = null;
}
this.lessonHintView = new HintView();
}

this.addCurHelpState = function (curHelp) {
this.helpsLoaded[curHelp.helpElement] = curHelp.value;
};

this.showHintsView = function() {
if (!this.lessonHintView) {
this.createLessonHintView();
}
//
this.lessonHintView.render();
if (this.lessonHintView.getHintsCount > 0) {
this.helpControlsView.showHintsButton();
Expand Down

0 comments on commit 186f24f

Please sign in to comment.