Merge pull request #128 from tophf/empty-code-section
Editor: show an empty code box for styles with no sections
This commit is contained in:
commit
4d768d8740
2
edit.js
2
edit.js
|
@ -773,7 +773,7 @@ function initWithStyle(style) {
|
||||||
document.querySelectorAll("#sections > div").forEach(function(div) {
|
document.querySelectorAll("#sections > div").forEach(function(div) {
|
||||||
div.parentNode.removeChild(div);
|
div.parentNode.removeChild(div);
|
||||||
});
|
});
|
||||||
style.sections.forEach(function(section) {
|
(style.sections.length == 0 ? [{code: ""}] : style.sections).forEach(function(section) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
maximizeCodeHeight(addSection(null, section), editors.length == style.sections.length);
|
maximizeCodeHeight(addSection(null, section), editors.length == style.sections.length);
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user