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