Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inspector Container's SubContainer? #19

Open
Apidcloud opened this issue Sep 22, 2017 · 1 comment
Open

Inspector Container's SubContainer? #19

Apidcloud opened this issue Sep 22, 2017 · 1 comment

Comments

@Apidcloud
Copy link
Member

Apidcloud commented Sep 22, 2017

Problem

Let's say we have a class composition such as Text[DropShadow[Stroke[Color]]]

Where Color is the only class with a specific inspector editor.

How is inspector supposed to draw dropshadow properties?

Currently, it doesn't show its property Stroke because the inspector getPropertyContainers depth limit is 1. Going further one more level (see the example below) just makes Stroke appear in a different container.

function getPropertyContainers(object) {
            let propertyContainers = [];
            propertyContainers.push(createPropertyContainerFromObject(object));

            let ownContainerProperties = getObjectOwnContainerProperties(object);
            ownContainerProperties.forEach(function (property) {
                propertyContainers.push(createPropertyContainerFromObject(object[property]));

                const propertyOwnContainer = getObjectOwnContainerProperties(object[property]);

                propertyOwnContainer.forEach(function (subProperty) {
                    propertyContainers.push(createPropertyContainerFromObject(object[property][subProperty]));
                });

            });

            return propertyContainers;
        }

Which results in:
image

Expected Behavior

It's open to discussion, but showing the stroke properties inside dropshadow container is a possible solution.

@Apidcloud
Copy link
Member Author

Apidcloud commented Sep 23, 2017

I have come up with a solution, but it relies on knowing which editors are available. It fetches the properties when it's populating an already separate (own) container (e.g., dropshadow) and custom editor rule isn't set nor available. Syncing isn't working yet though. Not sure if multiple definitions need some work as well.

Result:
image

Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment