[BUG] Layer visibility btn
Question
If I change the state of the visibility btn - gjs will remove display style and then when I click "show layer" - it won't restore display style. I think it's a bug. Gjs should save current display's options on layer visibility button click to restore it.
Answers (3)
I agree 👍
OK guys I found a hotfix for this problem if you need:
let itmView = editor.LayerManager.getAll();
itmView.__proto__.toggleVisibility = function(e) {
e && e.stopPropagation();
const model = this.model;
const style = model.getStyle();
const hidden = style.display == 'none';
if (hidden) {
if (model.attributes.oldStyleDisplay) {
style.display = model.attributes.oldStyleDisplay;
delete model.attributes.oldStyleDisplay;
} else {
delete style.display;
}
} else {
model.attributes.oldStyleDisplay = style.display;
style.display = 'none';
}
model.setStyle(style);
}
Thanks @h3llomoto the logic is totally correct, I'll make the same change but a bit more idiomatic
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2681
[BUG]: destroy() method didn't fully remove events
version: latest: v-0.16.3. important: update from v-0.15.9 to v-0.16.3 while keep everything same, the error will show in console: This err...
Issue #1506
Css Media Query Issue
Hello @artf There is an issue on demo page as well as library in media query. Issue is that if user update style on mobile view first and t...
Issue #1512
Undo/Redo not working in Countdown and Navigation element
Hi @artf, when i drag countdown and navigation in live demo and click on undo/redo button then nothing happens.can you please provide some...
Issue #3547
BUG: Dragging multiple blocks reverses the order
Version: 0.17.4 Are you able to reproduce the bug from the demo? YES What is the expected behavior? When dragging the blocks, the order sho...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.