The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniGraffle > OmniGraffle General
FAQ Members List Calendar Search Today's Posts Mark Forums Read

locking magnets during object resize? Thread Tools Search this Thread Display Modes
I have custom magnets on two shapes with lines connecting the two shapes. When I resize the objects, the magnets shift position - they seem to maintain a relative positioning. I then have to select each magnet and move them back to where they were. This is very tedious as I don't know exactly what size I want a shape when I first draw it.

Is there any way to lock the magnets so they maintain some kind of absolute positioning during a resize?


If you place them by hand the magnets are off by a little bit. You could use applescript to place them exactly.

The coordinately system places the object center at 0,0 and scales the object to a size of 1.

-- select an objects to add magnets to in omnigraffle

-- these are examples lists of points for each edge of an object 
-- the two corners and the middle each get a magnet

set left_edge to {{-0.5, -0.5}, {-0.5, 0}, {-0.5, 0.5}}
set right_edge to {{0.5, -0.5}, {0.5, 0}, {0.5, 0.5}}
set bottom_edge to {{-0.5, 0.5}, {0, 0.5}, {0.5, 0.5}}
set top_edge to {{-0.5, -0.5}, {0, -0.5}, {0.5, -0.5}}

tell front window of application "OmniGraffle Professional"
	-- this will add magnets to all selected objects
	set objects to selection
	repeat with obj in objects
		set magnets of obj to left_edge
	end repeat
end tell

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Position Image on an Object in a Relative Positon So It Maintains Relative Position but no Resize acowan OmniGraffle General 5 2013-01-08 01:04 PM
OF for iPad locking up csonni OmniFocus for iPad 4 2012-10-30 01:30 PM
Locking the sidebar ekebergandersen OmniFocus 1 for Mac 1 2010-12-03 03:06 PM
priority vs. locking metajack OmniPlan General 2 2006-12-19 07:18 PM

All times are GMT -8. The time now is 07:23 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2022, vBulletin Solutions, Inc.