@@ -60,12 +60,6 @@ define(function (require, exports, module) {
6060 */
6161 var DYNAMIC_FONT_FAMILY_ID = "codemirror-dynamic-font-family" ;
6262
63- /**
64- * @const
65- * @type {string }
66- */
67- var DYNAMIC_LINE_HEIGHT_ID = "codemirror-dynamic-line-height" ;
68-
6963 /**
7064 * @const
7165 * @private
@@ -90,14 +84,6 @@ define(function (require, exports, module) {
9084 */
9185 var DEFAULT_FONT_SIZE = 12 ;
9286
93- /**
94- * @const
95- * @private
96- * The default line height
97- * @type {number }
98- */
99- var DEFAULT_LINE_HEIGHT = 1.25 ;
100-
10187 /**
10288 * @const
10389 * @private
@@ -168,23 +154,6 @@ define(function (require, exports, module) {
168154 _addDynamicProperty ( DYNAMIC_FONT_FAMILY_ID , "font-family" , fontFamily ) ;
169155 }
170156
171- /**
172- * @private
173- * Removes the styles used to update the font family
174- */
175- function _removeDynamicLineHeight ( ) {
176- _removeDynamicProperty ( DYNAMIC_LINE_HEIGHT_ID ) ;
177- }
178-
179- /**
180- * @private
181- * Add the styles used to update the line height
182- * @param {string } lineHeight A string with the line height with size unit
183- */
184- function _addDynamicLineHeight ( lineHeight ) {
185- _addDynamicProperty ( DYNAMIC_LINE_HEIGHT_ID , "line-height" , lineHeight , true , ".CodeMirror-lines > div" ) ;
186- }
187-
188157 /**
189158 * @private
190159 * Sets the font size and restores the scroll position as best as possible.
@@ -286,43 +255,6 @@ define(function (require, exports, module) {
286255 }
287256
288257
289- /**
290- * Line height setter to set the line height of the document editor
291- * @param {string } lineHeight The line height. The value is in 'em'.
292- */
293- function setLineHeight ( lineHeight ) {
294- var editor = EditorManager . getCurrentFullEditor ( ) ,
295- oldValue = prefs . get ( "lineHeight" ) ;
296-
297- // Make sure the incoming value is a number... Strip off any size units
298- lineHeight = parseFloat ( lineHeight ) ;
299-
300- if ( oldValue === lineHeight ) {
301- return ;
302- }
303-
304- _removeDynamicLineHeight ( ) ;
305- if ( lineHeight ) {
306- _addDynamicLineHeight ( lineHeight ) ;
307- }
308-
309- $ ( exports ) . triggerHandler ( "lineHeightChange" , [ lineHeight , oldValue ] ) ;
310- prefs . set ( "lineHeight" , lineHeight ) ;
311-
312- if ( editor ) {
313- editor . refreshAll ( ) ;
314- }
315- }
316-
317- /**
318- * Line height getter to get the line height for the document editor
319- * @return {string } The line height with size unit as 'em' for the document editor
320- */
321- function getLineHeight ( ) {
322- return prefs . get ( "lineHeight" ) ;
323- }
324-
325-
326258 /**
327259 * @private
328260 * Increases or decreases the editor's font size.
@@ -397,7 +329,6 @@ define(function (require, exports, module) {
397329 function init ( ) {
398330 _addDynamicFontFamily ( prefs . get ( "fontFamily" ) ) ;
399331 _addDynamicFontSize ( prefs . get ( "fontSize" ) ) ;
400- _addDynamicLineHeight ( prefs . get ( "lineHeight" ) ) ;
401332 _updateUI ( ) ;
402333 }
403334
@@ -427,12 +358,11 @@ define(function (require, exports, module) {
427358 }
428359
429360 /**
430- * Restores the font size, font family, and line height back to factory settings.
361+ * Restores the font size and font family back to factory settings.
431362 */
432363 function restoreFonts ( ) {
433364 setFontFamily ( DEFAULT_FONT_FAMILY ) ;
434365 setFontSize ( DEFAULT_FONT_SIZE + "px" ) ;
435- setLineHeight ( DEFAULT_LINE_HEIGHT ) ;
436366 }
437367
438368
@@ -553,7 +483,6 @@ define(function (require, exports, module) {
553483 PreferencesManager . convertPreferences ( module , { "fontSizeAdjustment" : "user" } , true , _convertToNewViewState ) ;
554484
555485 prefs . definePreference ( "fontSize" , "string" , DEFAULT_FONT_SIZE + "px" ) ;
556- prefs . definePreference ( "lineHeight" , "number" , DEFAULT_LINE_HEIGHT ) ;
557486 prefs . definePreference ( "fontFamily" , "string" , DEFAULT_FONT_FAMILY ) ;
558487
559488 // Update UI when opening or closing a document
@@ -568,6 +497,4 @@ define(function (require, exports, module) {
568497 exports . setFontSize = setFontSize ;
569498 exports . getFontFamily = getFontFamily ;
570499 exports . setFontFamily = setFontFamily ;
571- exports . getLineHeight = getLineHeight ;
572- exports . setLineHeight = setLineHeight ;
573500} ) ;
0 commit comments