Jump to content
Timber

Can someone post a quick tutorial on constraints?

Recommended Posts

Hi, I've managed to figure out most of the new features - Text Styles, and even Symbols to a large degree, somehow using Constraints seems to elude me? Nothing in Help yet! No tool tips! Just nudge me in the right direction would be helpful. Actually a tutorial of covering all the new items, even though subject to change, would be immensely useful.

Thanks – Timber

Share this post


Link to post
Share on other sites

I've fiddled with it some. Since you figured out symbols, I'm assuming you've already found the constraints tab in the same spot. I'd drag it somewhere other than the same group that has the layers tab so you can work with both easily as you experiment.

 

Now create a new layer, and put a shape inside of that layer. Select the shape and click on the dotted line connecting the bottom edge of inner square to the bottom edge of the outer square in the constraints tab. Now if you select the bottom edge of the layer and change its size, you should see that the inner shape stays the same distance from the bottom of the layer. You will also note that its height does not change, at least as long as there is room for it in the layer. If, however, you change the left or right edge, the inner shape will move proportionally with the layer since you didn't select those edges.

 

Now select the rectangle again and select the dotted line running from top to bottom of the inner square. (Leave the bottom anchor selected too.) Now if you move the bottom or the top edge of the layer, you will notice that not only does the shape stay a constant distance from the bottom edge, but the shape also grows proportionally with the remainder of the space.

 

What I haven't yet figured out is what those two little icons in the lower right corner with the inward and outward facing arrows in the circles do. If someone else has figured that part out, I'd be grateful.

Share this post


Link to post
Share on other sites

I'm lost at what constitutes a container? What is the bounding box that can be resized and the contents have contained actions?

Is it a grouping? Not sure what you mean by "bottom edge of the layer". Thanks for the generous efforts to enlighten me.

Share this post


Link to post
Share on other sites

Hi Timber,

 

Take a look at my quick test file I made the other day - it's just a simple example of a container (this is ANY object that is 'above' another in the layers panel tree hierarchy) and contents which are constrained. Changing the container will force the contents to be constrained as per the way they are defined. Hopefully the file will make some sense :)

 

resize_me.afdesign

 

Thanks,

Matt

Share this post


Link to post
Share on other sites

OK, an Aha moment. Thanks to the generous feedback and examples of responders, I see that objects need to be a sub-layer or a nested-layer of another layer, i.e. the "container". Still unclear about the little icons in the lower right corner of the Constrain dialog do, but am now able to get it to actually work.

Share this post


Link to post
Share on other sites

Those icons control aspect scaling..

 

One of them will keep the object scaled in aspect - whilst always fitting inside the container (Min fit).

 

The other will keep the object scaled in aspect but allow it to get bigger than its container (Max fit).

 

Hope this helps,

 

Andy.

Share this post


Link to post
Share on other sites

Hey Matt, forgive me if I have overlooked it, but maybe a comprehensive video covering the latest features would cover off a lot of the questions you guys are having to keep answering? If such a video exists please point me to it.  :)  Cheers!!

 

Edit - sorry I see where MEB has explained why there aren't videos yet. My bad...  :huh:

Share this post


Link to post
Share on other sites

I just noticed that a constraints group will clip layer effects like outer shadows from that exceed the group. Is there a solution for this maybe? 

 

Thanks :)

Share this post


Link to post
Share on other sites

I just noticed that a constraints group will clip layer effects like outer shadows from that exceed the group. Is there a solution for this maybe? 

 

Thanks :)

 

 

I noticed this too.

A possible solution is to create a slightly larger "wrapper" to deal with assets effects.

You can find as example the iOS slider available in the Assets Studio, where the knob has its own shadow.


The white dog, making tools for artists, illustrators and doodlers

Share this post


Link to post
Share on other sites

Hi Daniele Salvatore,

Seems everything is right from your screenshot. There's no constraints applied to the grey rectangle (which is the container). Now select the red rectangle in the Layers panel and apply some constraints to it (if you haven't added some yet). Finally resize the grey rectangle on canvas and you should see the red rectangle honouring the constraints you have defined.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.