##// END OF EJS Templates
pep 8 and js...
Matthias BUSSONNIER -
Show More
@@ -22,15 +22,15 b' var IPython = (function (IPython) {'
22 containment: 'window',
22 containment: 'window',
23 axis:'y',
23 axis:'y',
24 helper: null ,
24 helper: null ,
25 drag: function(event,ui){
25 drag: function(event, ui) {
26 // recalculate the amount of space the pager should take
26 // recalculate the amount of space the pager should take
27 var pheight =($(body).height()-event.clientY-4);
27 var pheight = ($(body).height()-event.clientY-4);
28 var downprct = pheight/IPython.layout_manager.app_height();
28 var downprct = pheight/IPython.layout_manager.app_height();
29 downprct = Math.min(0.9,downprct);
29 downprct = Math.min(0.9, downprct);
30 if(downprct < 0.1) {
30 if (downprct < 0.1) {
31 that.percentage_height = 0.1;
31 that.percentage_height = 0.1;
32 that.collapse({'duration':0});
32 that.collapse({'duration':0});
33 } else if(downprct > 0.2) {
33 } else if (downprct > 0.2) {
34 that.percentage_height = downprct;
34 that.percentage_height = downprct;
35 that.expand({'duration':0});
35 that.expand({'duration':0});
36 }
36 }
@@ -52,12 +52,12 b' var IPython = (function (IPython) {'
52 Pager.prototype.bind_events = function () {
52 Pager.prototype.bind_events = function () {
53 var that = this;
53 var that = this;
54
54
55 this.pager_element.bind('collapse_pager', function (event,extrap) {
55 this.pager_element.bind('collapse_pager', function (event, extrap) {
56 time = (extrap != undefined) ? ((extrap.duration != undefined ) ? extrap.duration : 'fast') : 'fast';
56 time = (extrap != undefined) ? ((extrap.duration != undefined ) ? extrap.duration : 'fast') : 'fast';
57 that.pager_element.hide(time);
57 that.pager_element.hide(time);
58 });
58 });
59
59
60 this.pager_element.bind('expand_pager', function (event,extrap) {
60 this.pager_element.bind('expand_pager', function (event, extrap) {
61 time = (extrap != undefined) ? ((extrap.duration != undefined ) ? extrap.duration : 'fast') : 'fast';
61 time = (extrap != undefined) ? ((extrap.duration != undefined ) ? extrap.duration : 'fast') : 'fast';
62 that.pager_element.show(time);
62 that.pager_element.show(time);
63 });
63 });
@@ -81,7 +81,7 b' var IPython = (function (IPython) {'
81 Pager.prototype.collapse = function (extrap) {
81 Pager.prototype.collapse = function (extrap) {
82 if (this.expanded === true) {
82 if (this.expanded === true) {
83 this.expanded = false;
83 this.expanded = false;
84 this.pager_element.add($('div#notebook')).trigger('collapse_pager',extrap);
84 this.pager_element.add($('div#notebook')).trigger('collapse_pager', extrap);
85 };
85 };
86 };
86 };
87
87
@@ -89,7 +89,7 b' var IPython = (function (IPython) {'
89 Pager.prototype.expand = function (extrap) {
89 Pager.prototype.expand = function (extrap) {
90 if (this.expanded !== true) {
90 if (this.expanded !== true) {
91 this.expanded = true;
91 this.expanded = true;
92 this.pager_element.add($('div#notebook')).trigger('expand_pager',extrap);
92 this.pager_element.add($('div#notebook')).trigger('expand_pager', extrap);
93 };
93 };
94 };
94 };
95
95
General Comments 0
You need to be logged in to leave comments. Login now