mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
reverted checkbox class and added method to controller
This commit is contained in:
parent
dae08107e2
commit
64cd724139
@ -15,16 +15,20 @@
|
|||||||
this.splitByLayersCheckbox = document.querySelector('.zip-split-layers-checkbox');
|
this.splitByLayersCheckbox = document.querySelector('.zip-split-layers-checkbox');
|
||||||
this.addEventListener(this.splitByLayersCheckbox, 'change', this.onSplitLayersClick_);
|
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.useLayerNamesCheckbox = document.querySelector('.zip-use-layer-names-checkbox');
|
||||||
this.useLayerNamesCheckboxContainer.hidden = !this.splitByLayersCheckbox.checked;
|
this.toggleHideUseLayerNamesCheckbox();
|
||||||
|
|
||||||
var zipButton = document.querySelector('.zip-generate-button');
|
var zipButton = document.querySelector('.zip-generate-button');
|
||||||
this.addEventListener(zipButton, 'click', this.onZipButtonClick_);
|
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 () {
|
ns.ZipExportController.prototype.onSplitLayersClick_ = function () {
|
||||||
this.useLayerNamesCheckboxContainer.hidden = !this.splitByLayersCheckbox.checked;
|
this.toggleHideUseLayerNamesCheckbox();
|
||||||
};
|
};
|
||||||
|
|
||||||
ns.ZipExportController.prototype.onZipButtonClick_ = function () {
|
ns.ZipExportController.prototype.onZipButtonClick_ = function () {
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<input id="zip-split-layers" class="zip-split-layers-checkbox checkbox-fix" type="checkbox" />
|
<input id="zip-split-layers" class="zip-split-layers-checkbox checkbox-fix" type="checkbox" />
|
||||||
<label for="zip-split-layers">Split by layers</label>
|
<label for="zip-split-layers">Split by layers</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="use-layer-names-checkbox-container" style="margin: 5px 0;">
|
<div class="checkbox-container use-layer-names-container" style="margin: 5px 0;">
|
||||||
<input id="zip-use-layer-names" class="zip-use-layer-names-checkbox checkbox-fix" type="checkbox" />
|
<input id="zip-use-layer-names" class="zip-use-layer-names-checkbox checkbox-fix" type="checkbox" />
|
||||||
<label for="zip-use-layer-names">Index by layer names</label>
|
<label for="zip-use-layer-names">Index by layer names</label>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user