At some point several versions ago I started to notice something peculiar about the visualisation grid behaviour in codesys. My standard grid size is four points. I have snap-to-grid enabled 99% of the time.
When dragging the size of a component that is already in place (e.g. a button) from the left or top the new position snaps to grid point as expected. In other words, the result is a component that has its x and y coordinates at a multiple of 4. What has changed, is the behaviour when dragging the size from the right side or down side. Again, the new size appears to snap to the grid as you would expect. But upon closer inspection this is not the case. The new width (or height) after dragging the right edge (or lower edge) is a multiple of 4 PLUS 1.
E.g. starting with a component width of 40. After dragging the right edge one grid position to the right I would have expected the new width to be 44. It is not, it will be 45. Same if I drag a few positions further. E.g. when I would expect it to snap to a width of 60, instead it snaps to a width of 61 points.
At first sight this seems of little relevance but it messes things up visually because of z-order that comes into play when two adjacent components rather than just "touch" upon each other will instead overlap by 1 pixel. Ugly when placing buttons, for instance.
My points and questions about this:
1. I have not noticed mention of this change in release notes. When has this changed?
2. Is anyone else aware of this peculiar behaviour?
3. Is there a reason for this change, is it intentional? If so: what is the reason? I cannot think of any good reason for the visualisation designer to act so inconsequential.
4. Is there a workaround or fix that would make width and height abide by a preferred grid size of 4 points rather than to do this weird (multiple of four)+1 behaviour?
Has no one else seen this? Anyone at 3S Software looked into this?
no I have not seen or heard of this issue.
I think it is the best you report this issue and also include the affects version and when it was as you expected.
Thank you for responding Marcel. Do you mean submit a ticket?
Yes, submit a ticket via the store reporting the issue including Steps to Repeat and affects version.
Log in to post a comment.