Issue #2863πŸ’¬ AnsweredOpened June 30, 2020by mcottret2 reactions

Programmatic retrieval of layers' visibility always returns `true`

Quick answerby artf❀ 1

Yeah, you're totally right, the PR is welcome :)

Read full answer below ↓

Question

Hello again :) Our team might have found a bug while using the Layer Manager API: every call to component.viewLayer.isVisible() seems to always return true, regardless of their actual state. Steps to reproduce:Open the demoSwitch to the layers panelClick on the eye icon to hide the "Body" layerOpen the consoleExecuting editor.getWrapper().viewLayer.isVisible() returns 1 instead of false Looking at the code, I believe this.model.getStyle() should be used instead of this.model.get('style') (which always returns {}) to retrieve the current display value. As always, I'd be happy to open a PR to f...

Answers (2)

artfβ€’ July 5, 2020

Yeah, you're totally right, the PR is welcome :)

mcottretβ€’ July 6, 2020

Great ! #2879 opened.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins β†’
Premium option

Premium plugins ship with support, regular updates, and production-ready features β€” save days of integration work.

Browse premium plugins β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.