Fix #126 line number spacing not updating on zoom
This also fixes the cursor and selected line spacing not updating, which is most obvious whet adjusting the line spacing. Manually firing a refresh event for selectLanguage is not necessary as it calls editor.setOption which fires this event internally.
This commit is contained in:
parent
7a1d1da331
commit
d24ea63120
2
index.js
2
index.js
|
@ -81,12 +81,14 @@ function setSize() {
|
|||
|
||||
document.querySelector('.CodeMirror').style.fontSize = `${size}px`;
|
||||
document.cookie = `size=${size};max-age=172800`;
|
||||
editor.refresh();
|
||||
}
|
||||
function setSpacing() {
|
||||
var spacing = document.getElementById('spacing').value;
|
||||
|
||||
document.querySelector('.CodeMirror').style.lineHeight = spacing;
|
||||
document.cookie = `spacing=${spacing};max-age=172800`;
|
||||
editor.refresh();
|
||||
}
|
||||
function selectLanguage() {
|
||||
var lang = document.getElementById('select-language').value;
|
||||
|
|
Loading…
Reference in New Issue