Jump to content
cbot

Snapping just stops working from time to time

Recommended Posts

Hi there,

 

when working with Affinity Designer I sometimes encounter problems with the snapping feature. Although I can't reliably reproduce the issue, it seems that from time to time it just stops working altogether. Restarting Affinity Designer does not help in such a case and if snapping has stopped working for a specific file, there seems to be no way to re-enable it. I can create a new file or open another one and snapping is working working fine there. I've attached a document to this post that demonstrates the problem. 

mtv.afdesign

Share this post


Link to post
Share on other sites

Hi cbot

Welcome to Affinity Forums.

Which version are you using, the MAS or the latest beta?

I'm asking this because It may be that the objects you cannot snap are all text objects. We didn't have snapping working for them (bounding boxes) until recently with one of the latest betas. There's also some more snapping improvements in development coming later. I recommend you to take a look at our latest beta - you can install it alongside the MAS version - to check if it helps.

 

Another situation that may be preventing you to snap to certain objects is if they aren't being considered as snapping candidates. To avoid a profusion of snapping lines in the canvas, Affinity Designer only snaps to 6 objects at a time (identified by a purple outline). If the object you are trying to snap to isn't in that group, just mouse over it a few seconds until the purple line appears. You can now snap to it.

Share this post


Link to post
Share on other sites

Hey MEB,

 

thanks for the quick reply. I was using the current MAS version before and I just tried it with the latest beta. The behavior with the attached document is somewhat different:

 

MAS version: snapping doesn't seem to work at all

Beta version: snapping does work, but only if I disable "snap to units"

 

In both versions snapping appears to be ok for new files.

Share this post


Link to post
Share on other sites

I think "Snap to units" needs adjusting. It tends to snap to too fine a grid, and overwhelms other snapping. For example, if you snap to pixels, you won't snap to anything else that is more than a pixel away.

Share this post


Link to post
Share on other sites

This is going to be something I look at soon.


SerifLabs team - Affinity Developer
  • Software engineer  -  Photographer  -  Guitarist  -  Philosopher
  • iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395
  • MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300
  • iPad Pro 10.5", 256GB

Share this post


Link to post
Share on other sites

There are still a lot that snapping doesn't seem to do, either reliably or at all, like snapping to document edges or to guides. But more importantly for me, I still haven't seen Snap to Units (Pixels) work properly. For instance, when I draw or resize a rectangle, there's a good chance that I end up with a .5 in the dimension px value. Is this normal behavior?

Share this post


Link to post
Share on other sites

This has been raised a number of times. We currently snap to 0.5 pixels as this allowed positioning of 1px lines so that they didn't straddle two pixels when rasterised.

 

We now have stroke alignment options, so the 0.5 pixel snapping is less important.  We will make this an option.

 

There should be no problems with align to document edge or guides.  It may be that if you have snap to pixels turned on that this is fighting with snapping to other objects.  A pixel boundary will in most cases be closer that other objects.  We snap to the closest object, and so snap to pixels nearly always wins.  It is this interaction I want to look at soon.

 

If you turn off snap to pixels - you should see that all other snapping works as you'd expect.


SerifLabs team - Affinity Developer
  • Software engineer  -  Photographer  -  Guitarist  -  Philosopher
  • iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395
  • MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300
  • iPad Pro 10.5", 256GB

Share this post


Link to post
Share on other sites

If you turn off snap to pixels - you should see that all other snapping works as you'd expect.

 

Yes, that does give me back a lot of the snapping goodness based, thanks. Just a bit inconvenient to be turning Snap to Pixels on and off everytime, but at least it works for now. Perhaps a snap heirarchy? Snap to Object trumps Snap to Pixels, for instance. Just not sure how that would play out with other Snap to Units types.

Share this post


Link to post
Share on other sites

Yes, that does give me back a lot of the snapping goodness based, thanks. Just a bit inconvenient to be turning Snap to Pixels on and off everytime, but at least it works for now. Perhaps a snap heirarchy? Snap to Object trumps Snap to Pixels, for instance. Just not sure how that would play out with other Snap to Units types.

 

 

I experimented with that kind of snapping logic already, and ended up removing it all.  It doesn't actually work as well as you'd imagine.  The problem is that you need to bias the snapping tolerance to account for preferred objects, but that leads to unexpected behaviour in certain situations.  You end up having to do multi-pass evaluation and then try decide what is the "best snap".


SerifLabs team - Affinity Developer
  • Software engineer  -  Photographer  -  Guitarist  -  Philosopher
  • iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395
  • MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300
  • iPad Pro 10.5", 256GB

Share this post


Link to post
Share on other sites

Hi Ben and Jose,

 

let me apologize for joining the discussion here, but I thought it would be appropriate to add an observation. I have experienced some annoying behavior when "snap to pixels" is enabled (and no other snapping option, just to be sure).

 

Let’s say, I want to create a rectangle at a zoom resolution that does not show each single pixel.

Then the size of the created rectangle will *very* often differ from the intended one by just 0.5 pixels.

Releasing the mouse button seems to introduce a 0.5 px difference.

 

Have a look at my video. When dragging the second rectangle to the final state the context field shows "W: 144 pixels", while the resulting object after releasing the mouse button has a width of 143.5 pixels. Since the left side of the rectangle has a non-integer X-value of 540.5 pixels, it seems that releasing the mouse button makes the right side of the rectangle snap to integer pixel values ...

 

I cannot explain this behavior. It happens also when I am very anxious to keep the mouse in place while releasing the left mouse button. And it is not confined to width-values ...

 

I am not sure, if this strange behavior is already known, but if so, please excuse my posting.

 

:) Alex

 

EDIT Deleted the attachments due to upload limits.

Share this post


Link to post
Share on other sites

Hi MEB,

 

I do not think I have misunderstood what Ben said in #7, but I wanted to point to another issue. What I have written is not about snapping to half pixel values. Please have a look at my video.

  • A: When I create the second rectangle, you will see me drawing the rectangle until it is exactly 144 pixels wide (see the numeric context field). 
  • B: When I release the mouse button (while holding the mouse in place), the width of the resulting rectangle is displayed as 143.5 pixels. 

And that does not seem to be what snapping is all about. I always thought that drawing and dragging are user actions, where snapping should appear, not releasing the mouse button. Or am I completely misguided?

 

Cheers, Alex

post-1198-0-98277000-1421758479_thumb.png

Share this post


Link to post
Share on other sites

No problem.  :)

 

Are you using an Apple Magic mouse?

 

No, my mouse is just an ordinary Logitech thingy (two buttons, scroll wheel) ...  

And the same issue shows up when using the internal trackpad of my MBP (just checked) ...

 

I'm not able to replicate it with a regular mouse.

 

Strange. I wonder what I am doing wrong. Perhaps I should get some other mice to test it ...

You can imagine that this is a very annoying issue when working on interface graphics ...

 

Perhaps an OS X Lion specific issue?

Share this post


Link to post
Share on other sites

It is possible that when you release the mouse button you are also moving the mouse.  Snapping is calculated again when the mouse button is released (it is handled by a variation of the code for mouse movements).  The reason for this is that it is possible to press and release the mouse without an intermediate mouse movement - snapping still gets applied.

 

As I said before - with 0.5 pixel snapping applied, the result could just be on the side of a 0.5 snap - giving you the resulting position/size.

 

If you zoom in so that a document pixel is much larger (say 400%), I'd image you wouldn't get this issue.  If your document is displayed at less than 100%, then snap to pixel will be snapping at a finer precision than your screen resolution - and subject to tolerances that will give you a less predictable result.


SerifLabs team - Affinity Developer
  • Software engineer  -  Photographer  -  Guitarist  -  Philosopher
  • iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395
  • MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300
  • iPad Pro 10.5", 256GB

Share this post


Link to post
Share on other sites

A_B_C - I'll take a look at the precision issue in the UI you mentioned.


SerifLabs team - Affinity Developer
  • Software engineer  -  Photographer  -  Guitarist  -  Philosopher
  • iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395
  • MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300
  • iPad Pro 10.5", 256GB

Share this post


Link to post
Share on other sites

I take it that it only displays the new different value after you release the mouse - you don't get anything in the Transform panel while creating the object.

 

In which case, my post #16 is still likely to be the reason.  Saying that - I've not managed to recreate the problem yet myself.


SerifLabs team - Affinity Developer
  • Software engineer  -  Photographer  -  Guitarist  -  Philosopher
  • iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395
  • MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300
  • iPad Pro 10.5", 256GB

Share this post


Link to post
Share on other sites

Hi MEB and Ben,

 

thanks a lot for your answers! It definitely appears that this is an OS X Lion issue.

 

Just got back to my Mavericks machine, performed some tests, and voilà, there is no precision problem at all (even when zooming out very much). :)

 

On the other hand I was able to reproduce the issue on Lion constantly trying different mice and the internal trackpad of my MBP. I also tried to slow down the mouse speed in the system preferences, used the internal trackpad with two fingers (one just to press down the trackpad and let it go after dragging), changed the snapping distance setting: but all this had no effect on Lion at all.  :(

 

Since I cannot reproduce the issue on Mavericks, I take it for granted that it is not a nervous right hand that causes the value difference. So please check if you can reproduce the issue on Lion. Otherwise there’s something wrong with me ...  ;)

 

Thanks again, Alex

 

P.S. And you are right, Ben (#18): it only displays the new different value after releasing the mouse. My screen shot in #12 shows two different states merged into one image for easy reference.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

Please note the Annual Company Closure section in the Terms of Use. 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.