Преглед на файлове

[codemirror] Implemented lineHeight and charWidtg getters

akosyakov преди 8 години
родител
ревизия
6644cef003
променени са 1 файла, в които са добавени 2 реда и са изтрити 4 реда
  1. 2 4
      src/codemirror/editor.ts

+ 2 - 4
src/codemirror/editor.ts

@@ -134,16 +134,14 @@ class CodeMirrorEditor implements CodeEditor.IEditor {
    * The height of a line in the editor in pixels.
    */
   get lineHeight(): number {
-    // TODO css measurement
-    return -1;
+    return this._editor.defaultTextHeight();
   }
 
   /**
    * The widget of a character in the editor in pixels.
    */
   get charWidth(): number {
-    // TODO css measurement
-    return -1;
+    return this._editor.defaultCharWidth();
   }
 
   /**