Copy of Component moves with the original


#1

Hi, new to Subform,

Whenever I create a component and create a copy of it, I can’t move the copy. First instance and duplicate are always moving together.

What am I doing wrong?

===
Subform Beta 4240.0.0+cc7387d
Build date: 2017-12-04
OS: Darwin 16.4.0


#2

Make sure the component is set to “Parent-Directed” and not “Self-Directed” and contain all the components in their own container boxes to set different positions of the component.

If that doesn’t make sense I can send a screenshot or two.


#3

You can also fiddle with the “Override” button but that is more for single case scenarios and doesn’t seem to solve what you want to achieve.


#4

The issue is only occures when parent is set to grid
Both components are parent-directed


#5

What’s going on is that component instances are functionally identical to each other as far as the layout is concerned. This is particularly noticeable with self-directed components, because the parent element isn’t telling them where to position, as in a stack. So if you move a self-directed component, all the instances of that component move to the exact same location.

We do this because there are times where you want a component to always be in a specific location, like a status bar that should always be 100% width and at the top of its parent.

To give a component instance different layout settings, after you duplicate, press the “override” button in the layout tab, next to “element layout.” This will override the instance’s layout settings, but its children layout and style settings will remain linked to the component.

Here’s a super-quick video showing that:

All this said, Kevin and I have discussed that a component instance’s layout settings should probably be in the “overridden” state by default. In common use, I think it’s much more likely that instances will have different positioning / layout than the same.

Let me talk with Kevin on it, but I think this is something we can probably get changed around in the next release or two.


#6

Now it makes sense. Thanks. Got it