mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 00:40:07 +02:00
Resolves #177 fixes start vis in level builder with new click ability
This commit is contained in:
parent
40d60c4bcc
commit
fa0faecff0
1 changed files with 30 additions and 1 deletions
|
@ -62,7 +62,8 @@ var LevelBuilder = Level.extend({
|
||||||
|
|
||||||
initName: function() {
|
initName: function() {
|
||||||
this.levelToolbar = new LevelToolbar({
|
this.levelToolbar = new LevelToolbar({
|
||||||
name: intl.str('level-builder')
|
name: intl.str('level-builder'),
|
||||||
|
parent: this
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -73,8 +74,36 @@ var LevelBuilder = Level.extend({
|
||||||
LevelBuilder.__super__.initGoalData.apply(this, arguments);
|
LevelBuilder.__super__.initGoalData.apply(this, arguments);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* need custom handlers since we have two visualizations >___<
|
||||||
|
*/
|
||||||
|
minimizeGoal: function (position, size) {
|
||||||
|
this.doBothVis('hide');
|
||||||
|
this.goalWindowPos = position;
|
||||||
|
this.goalWindowSize = size;
|
||||||
|
this.levelToolbar.$goalButton.text(intl.str('show-goal-button'));
|
||||||
|
if ($('#goalPlaceholder').is(':visible')) {
|
||||||
|
$('#goalPlaceholder').hide();
|
||||||
|
this.mainVis.myResize();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
doBothVis: function(method) {
|
||||||
|
if (this.startVis) {
|
||||||
|
this.startVis[method].call(this.startVis);
|
||||||
|
}
|
||||||
|
if (this.goalVis) {
|
||||||
|
this.goalVis[method].call(this.goalVis);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
resizeGoal: function () {
|
||||||
|
this.doBothVis('myResize');
|
||||||
|
},
|
||||||
|
|
||||||
initStartVisualization: function() {
|
initStartVisualization: function() {
|
||||||
this.startCanvasHolder = new CanvasTerminalHolder({
|
this.startCanvasHolder = new CanvasTerminalHolder({
|
||||||
|
parent: this,
|
||||||
additionalClass: 'startTree',
|
additionalClass: 'startTree',
|
||||||
text: intl.str('hide-start')
|
text: intl.str('hide-start')
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue