##// END OF EJS Templates
rename scroll_threshold, add minimum_ prefix
Matthias BUSSONNIER -
Show More
@@ -168,7 +168,7 b' var IPython = (function (IPython) {'
168 * Threshold to trigger autoscroll when the OutputArea is resized,
168 * Threshold to trigger autoscroll when the OutputArea is resized,
169 * typically when new outputs are added.
169 * typically when new outputs are added.
170 *
170 *
171 * Behavior is undefined if autoscroll is lower than scroll_threshold,
171 * Behavior is undefined if autoscroll is lower than minimum_scroll_threshold,
172 * unless it is < 0, in which case autoscroll will never be triggered
172 * unless it is < 0, in which case autoscroll will never be triggered
173 *
173 *
174 * @property auto_scroll_threshold
174 * @property auto_scroll_threshold
@@ -183,12 +183,12 b' var IPython = (function (IPython) {'
183 * Lower limit (in lines) for OutputArea to be made scrollable. OutputAreas
183 * Lower limit (in lines) for OutputArea to be made scrollable. OutputAreas
184 * shorter than this are never scrolled.
184 * shorter than this are never scrolled.
185 *
185 *
186 * @property scroll_threshold
186 * @property minimum_scroll_threshold
187 * @type Number
187 * @type Number
188 * @default 20
188 * @default 20
189 *
189 *
190 **/
190 **/
191 OutputArea.scroll_threshold = 20;
191 OutputArea.minimum_scroll_threshold = 20;
192
192
193
193
194 /**
194 /**
@@ -196,17 +196,17 b' var IPython = (function (IPython) {'
196 * Scroll OutputArea if height supperior than a threshold (in lines).
196 * Scroll OutputArea if height supperior than a threshold (in lines).
197 *
197 *
198 * Threshold is a maximum number of lines. If unspecified, defaults to
198 * Threshold is a maximum number of lines. If unspecified, defaults to
199 * OutputArea.scroll_threshold.
199 * OutputArea.minimum_scroll_threshold.
200 *
200 *
201 * Negative or null (0) threshold will prevent the OutputArea from ever
201 * Negative or null (0) threshold will prevent the OutputArea from ever
202 * scrolling
202 * scrolling
203 *
203 *
204 * @method scroll_if_long
204 * @method scroll_if_long
205 * @param [lines=OutputArea.scroll_threshold]{Number} Default to `OutputArea.scroll_threshold`
205 * @param [lines=OutputArea.minimum_scroll_threshold]{Number} Default to `OutputArea.minimum_scroll_threshold`
206 *
206 *
207 **/
207 **/
208 OutputArea.prototype.scroll_if_long = function (lines) {
208 OutputArea.prototype.scroll_if_long = function (lines) {
209 var n = lines | OutputArea.scroll_threshold;
209 var n = lines | OutputArea.minimum_scroll_threshold;
210 if(n <= 0){
210 if(n <= 0){
211 return
211 return
212 }
212 }
General Comments 0
You need to be logged in to leave comments. Login now