The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniGraffle General (http://forums.omnigroup.com/forumdisplay.php?f=10)
-   -   Moving objects 1pt and 10pt at a time (http://forums.omnigroup.com/showthread.php?t=27228)

 barts 2012-11-29 01:59 PM

Moving objects 1pt and 10pt at a time

Hi,

I have my document in Omnigraffle set to have a 10pt grid with 1 minor grid step. If I select an object and use the arrow keys on my keyboard to move it, it moves it by 10pt and if I press shift it moves it by 1.039 pt. How do I get it to move by 10pt and 1pt (which is how Photoshop and Illustrator work)?

If I set it to 10pt grid with 10 minor grid steps, the arrow keys move it 1pt at a time and shift still moves it 1.039pt. Where is this 1.039pt coming from??

- Bart

 john.gersh 2012-11-30 05:34 AM

Here's the behavior I see with Snap to Grid selected*:
[LIST][*]Arrow key moves the object one major grid step.[*]Shift-arrow key moves the object one minor grid step divided by the zoom factor.[/LIST]In other words, with your grid, shift-arrow moves the object 1 pt at 100% zoom. At 200% it moves 0.5 point. At 50% it moves 2 pts.

This is somewhat reasonable. The effect is scaled to what you can see. If you zoom way in you can make very fine adjustments with shift-arrow; zoom way out and you can make only coarse ones. Arrow always moves one major grid step.

The rationale breaks down, though, when the zoom is not an integer or simple fraction. That typically happens when Fit in Window has been chosen as the zoom. If you see a 1.039 pt nudge, I'll bet you're at 96.25% zoom or thereabouts.

*For some unfathomable reason the keystrokes have the opposite effects if Snap to Grid is not selected: Shift-arrow moves a major grid step, arrow moves a zoomed minor step.

 barts 2012-11-30 08:31 AM

Hmm... When I'm at 100%, major grid at 10pt and minor at 1, I am seeing the grid move by 10pt with the arrows, and 1.818pt when I shift-arrow.

I would never want to move things by a half point or anything finer than 1pt and 10pt, so for my needs the differences at the zoom level aren't necessary (but good to know). I zoom in to be able to see the 1pt move more clearly since it's a little hard to see how things line up when I'm zoomed out and there's a border around the selected object.

 barts 2012-11-30 08:33 AM

Aha, and thank you for pointing out the snap to grid difference. That was my next question... drives me crazy seeing the behavior change on some pages/documents, so I must have snap to grid turned off on some.

 john.gersh 2012-11-30 12:27 PM

I'm afraid that my behavior analysis was all wrong. I generalized too much from the units in your example.

I looked some more and found that the real behavior (snap on, 100% zoom) is:
[LIST][*]Arrow moves one minor grid division.[*]Shift-arrow moves one point.[/LIST]Zoom affects shift-arrow in the same way as before.

I still can't figure out where your numbers come from.

One slightly-confusing UI feature: In the grid settings, the fields are Major Grid Spacing and Minor Grid Steps. In other words, the first is the [I]length[/I] of a major grid step. The second is the [I]number[/I] of minor steps in a major one, not the minor step length.

 bluehurry 2013-07-13 07:13 AM

I would love to hear an official response from Omnigraffle about this insane behavior (among many other insane behaviors in Omnigraffle, but that's another story). Maybe I'm just using this wrong, but I can't believe that there's only 1 thread with a few posts about this.

Anyhow, I *think* I understand how it works. I hope my post will be useful to others tearing their hair out trying to figure it out.

--

There are [B]FOUR[/B] separate settings (major grid spacing, minor grid steps, snap to grid, and page setup scale) [B]plus per-canvas zoom level[/B], that will affect the way using the arrow/shift-arrow key to move an object will work. This is completely insane. I can't believe this is actually how it works!

Major grid spacing & minor grid steps control how many pts an object moves by using the shift-arrow and arrow key, respectively. [LIST][*]Example 1: Major Grid Spacing 10pt + [B]Minor Grid Steps 1[/B] = shift-arrow moves 10pt, arrow moves 1pt[*]Example 2: Major Grid Spacing 10pt + [B]Minor Grid Steps 2[/B] = shift-arrow moves 5pt, arrow moves 1pt[*]Example 3: Major Grid Spacing 10pt + [B]Minor Grid Steps 5[/B] = shift-arrow moves 2pt, arrow moves 1pt[/LIST]
But that's only true if your canvas zoom level is at 100% AND your page setup scale is also 100%. Canvas zoom level affects how much an object moves using the arrow key (but not shift-arrow). The relationship is inversely proportional.

Using the 3 examples from above, this is the behavior:[LIST][*]shift-arrow will still move objects the amount of pts described in each example (either 10pt, 5pt, or 2pt), regardless of canvas zoom level[*]@200% canvas zoom level: arrow key moves an object 0.5pt[*]@50% canvas zoom level: arrow key moves an object 2pt[/LIST]
Page setup scale also has an effect. For example, a page setup scale of 50% means that all the canvas zoom level is halved. So if you are trying to fit your wireframes on to a page by using some weird page setup scale, using the arrow key to move objects will result in some incomprehensible distance!

For the purpose of this explanation, though, we'll use a page setup scale 50% to illustrate the point. So, continuing with our example:[LIST][*]shift-arrow will still move objects the amount of pts described in each example (either 10pt, 5pt, or 2pt), regardless of canvas zoom level[*]@50% page setup scale + @200% canvas zoom level: arrow key moves an object 1pt[*]@50% page setup scale + @100% canvas zoom level: arrow key moves an object 2pt[*]@50% page setup scale + @50% canvas zoom level: arrow key moves an object 4pt[*]@50% page setup scale + @400% canvas zoom level: arrow key moves an object 0.5pt[/LIST]
--

That covers 3 of the 4 settings. The last setting is 'Snap to Grid.' When this checkbox is selected, the behavior of the shift-arrow and arrow key in moving objects on the canvas is reversed.

--

Clear as mud? :-D

 RobTrew 2013-07-13 07:33 AM

One alternative would be to write a small set of simple scripts for movements of the size that you want, and then assign them to keystrokes with something like Keyboard Maestro.

(Probably faster than waiting for an 'official' solution – their hands are fairly full at the moment)

 RobTrew 2013-07-13 08:49 AM

For example, eight scripts – two for each cardinal direction (two sizes of movement).

Each could have the form:

[CODE]property pDX : 1 -- positive value for rightward, negative for leftward
property pDY : 0 -- positive value for downward, negative for upward

tell application id "OGfl"
tell front window
repeat with oSeln in (selection as list)
set {rX, rY} to origin of oSeln
set origin of oSeln to {rX + pDX, rY + pDY}
end repeat
end tell
end tell[/CODE]

and each would have different values for pDX and pDY.

 bluehurry 2013-07-13 10:35 AM

[QUOTE=RobTrew;126152]For example, eight scripts – two for each cardinal direction (two sizes of movement).

Each could have the form:

[CODE]property pDX : 1 -- positive value for rightward, negative for leftward
property pDY : 0 -- positive value for downward, negative for upward

tell application id "OGfl"
tell front window
repeat with oSeln in (selection as list)
set {rX, rY} to origin of oSeln
set origin of oSeln to {rX + pDX, rY + pDY}
end repeat
end tell
end tell[/CODE]

and each would have different values for pDX and pDY.[/QUOTE]

Thanks for the info. Since Omnigroup is too busy with other things, maybe they'll pay for the Keyboard Maestro licences as a workaround for the bug. ;-)

 Ken Case 2013-07-13 11:51 PM

The keyboard movement rules are actually very simple, once you know what they are!

By default, the arrow keys will move a shape by one screen pixel. This means you can zoom in to get finer positioning, then zoom back out to go back to moving one canvas point at a time.

If you turn on Snap to Grid, then the arrow keys will move by the smallest grid units. So if you set your major grid to be 1 inch and split that grid up into 8 minor grid steps, then the arrow keys will move a shape by 1/8 inch.

Holding Shift toggles the Snap to Grid behavior for that movement only, so if you're snapping to grid and want to move something by screen pixels, then you can use Shift-Arrow rather than having to turn Snap to Grid off and back on.

[QUOTE]… (among many other insane behaviors in Omnigraffle, but that's another story).[/QUOTE]

If there are other behaviors that are puzzling you, please feel free to ask! We try to drop by the forums from time to time, but we obviously do miss things here. (Just look at how long this thread went without an official response!) However, if you send us email at [email]omnigraffle@omnigroup.com[/email], we'll generally get back to you within a business day.

Hope this helps!

 Ken Case 2013-07-13 11:54 PM

P.S. — Note that the grid doesn't have to be visible. So if you're not using a grid but would like your arrow keys to always move 10 points at a time, just set your major grid spacing to 10 points, split it up onto just 1 minor grid step, and turn on "Snap to grid" (but leave "Show grid lines" turned off).

 All times are GMT -8. The time now is 01:42 PM.