diff --git a/src/js/controller/settings/exportimage/ZipExportController.js b/src/js/controller/settings/exportimage/ZipExportController.js index 92eaaa43..f9ef2b0c 100644 --- a/src/js/controller/settings/exportimage/ZipExportController.js +++ b/src/js/controller/settings/exportimage/ZipExportController.js @@ -15,16 +15,20 @@ this.splitByLayersCheckbox = document.querySelector('.zip-split-layers-checkbox'); this.addEventListener(this.splitByLayersCheckbox, 'change', this.onSplitLayersClick_); - this.useLayerNamesCheckboxContainer = document.querySelector('.use-layer-names-checkbox-container'); + this.useLayerNamesContainer = document.querySelector('.use-layer-names-container'); this.useLayerNamesCheckbox = document.querySelector('.zip-use-layer-names-checkbox'); - this.useLayerNamesCheckboxContainer.hidden = !this.splitByLayersCheckbox.checked; + this.toggleHideUseLayerNamesCheckbox(); var zipButton = document.querySelector('.zip-generate-button'); this.addEventListener(zipButton, 'click', this.onZipButtonClick_); }; + ns.ZipExportController.prototype.toggleHideUseLayerNamesCheckbox = function () { + this.useLayerNamesContainer.style.display = (this.splitByLayersCheckbox.checked ? 'block' : 'none'); + }; + ns.ZipExportController.prototype.onSplitLayersClick_ = function () { - this.useLayerNamesCheckboxContainer.hidden = !this.splitByLayersCheckbox.checked; + this.toggleHideUseLayerNamesCheckbox(); }; ns.ZipExportController.prototype.onZipButtonClick_ = function () { diff --git a/src/templates/settings/export/zip.html b/src/templates/settings/export/zip.html index f18b186f..c113daca 100644 --- a/src/templates/settings/export/zip.html +++ b/src/templates/settings/export/zip.html @@ -11,7 +11,7 @@ -