mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-30 09:44:26 +02:00
PR #166 show the squeezer when maximizing and hide it when minimziing
This commit is contained in:
parent
f5887908cd
commit
3ad888498f
1 changed files with 10 additions and 1 deletions
|
@ -216,6 +216,10 @@ var Level = Sandbox.extend({
|
||||||
this.goalWindowPos = position;
|
this.goalWindowPos = position;
|
||||||
this.goalWindowSize = size;
|
this.goalWindowSize = size;
|
||||||
this.levelToolbar.$goalButton.text(intl.str('show-goal-button'));
|
this.levelToolbar.$goalButton.text(intl.str('show-goal-button'));
|
||||||
|
if ($('#goalPlaceholder').is(':visible')) {
|
||||||
|
$('#goalPlaceholder').hide();
|
||||||
|
this.mainVis.myResize();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
resizeGoal: function () {
|
resizeGoal: function () {
|
||||||
|
@ -275,6 +279,11 @@ var Level = Sandbox.extend({
|
||||||
showGoal: function(command, defer) {
|
showGoal: function(command, defer) {
|
||||||
this.showSideVis(command, defer, this.goalCanvasHolder, this.initGoalVisualization);
|
this.showSideVis(command, defer, this.goalCanvasHolder, this.initGoalVisualization);
|
||||||
this.levelToolbar.$goalButton.text(intl.str('hide-goal-button'));
|
this.levelToolbar.$goalButton.text(intl.str('hide-goal-button'));
|
||||||
|
// show the squeezer again we are to the side
|
||||||
|
if ($(this.goalVis.el).offset().left > 0.5 * $(window).width()) {
|
||||||
|
$('#goalPlaceholder').show();
|
||||||
|
this.mainVis.myResize();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
showSideVis: function(command, defer, canvasHolder, initMethod) {
|
showSideVis: function(command, defer, canvasHolder, initMethod) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue