1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-14 10:36:19 +02:00

show indentation size value besides the range slider

This commit is contained in:
Kushagra Gour
2017-03-12 20:30:24 +05:30
parent c31c9dd948
commit 84bfa764f7
2 changed files with 7 additions and 1 deletions

View File

@ -4,7 +4,7 @@ onboardModal, layoutBtn1, layoutBtn2, layoutBtn3, layoutBtn4, helpBtn, onboardMo
addLibraryModal, addLibraryModal, notificationsBtn, notificationsModal, notificationsModal,
notificationsModal, notificationsBtn, codepenBtn, saveHtmlBtn, saveBtn, settingsBtn,
onboardModal, settingsModal, notificationsBtn, onboardShowInTabOptionBtn, editorThemeLinkTag,
onboardDontShowInTabOptionBtn, TextareaAutoComplete, savedItemCountEl */
onboardDontShowInTabOptionBtn, TextareaAutoComplete, savedItemCountEl, indentationSizeValueEl */
/* eslint-disable no-extra-semi */
;(function (alertsService) {
@ -1189,6 +1189,7 @@ onboardDontShowInTabOptionBtn, TextareaAutoComplete, savedItemCountEl */
$('[data-setting=cssMode]').value = prefs.cssMode;
$('[data-setting=jsMode]').value = prefs.jsMode;
$('[data-setting=indentSize]').value = prefs.indentSize;
indentationSizeValueEl.textContent = prefs.indentSize;
$('[data-setting=indentWith][value=' + (prefs.indentWith || 'spaces') + ']').checked = true;
$('[data-setting=isCodeBlastOn]').checked = prefs.isCodeBlastOn;
$('[data-setting=editorTheme]').value = prefs.editorTheme;
@ -1217,6 +1218,10 @@ onboardDontShowInTabOptionBtn, TextareaAutoComplete, savedItemCountEl */
htmlCode.querySelector('.CodeMirror').style.fontSize = prefs.fontSize;
cssCode.querySelector('.CodeMirror').style.fontSize = prefs.fontSize;
jsCode.querySelector('.CodeMirror').style.fontSize = prefs.fontSize;
// Update indentation count when slider is updated
indentationSizeValueEl.textContent = $('[data-setting=indentSize]').value;
['html', 'js', 'css'].forEach((type) => {
scope.cm[type].setOption(
'indentWithTabs',