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

 
Bug: textPosition property misaligns text in Circles Thread Tools Search this Thread Display Modes
The textPosition property in the OmniGraffle applescript library correctly positions text within a "Rectangle" shape, but has a bug which misplaces text in "Circle" shapes.



Code:
property lstTextPosn : {0, 0}

tell application id "OGfl"
	tell front canvas of front document
		-- ADD A LABEL
		make new shape with properties ¬
			{size:{200, 20}, origin:{120, 50}, name:"Rectangle", draws stroke:false, fill:no fill, draws shadow:false, text:{font:"Verdana", size:16, color:{65500, 0, 0}, text:"textPosition: {0,0}", alignment:center}}
		
		-- RUN A TEST:
		-- RECTANGLE: TEXTPOSITION PROPERTY WORKS
		make new shape with properties ¬
			{name:"Rectangle", origin:{100, 100}, size:{100, 100}, textPosition:lstTextPosn, text:{alignment:center, text:"This works"}} ¬
				
		
		-- CIRCLE: TEXTPOSITION PROPERTY MISPLACES THE TEXT -- *OFF* CENTER 
		make new shape with properties ¬
			{name:"Circle", origin:{250, 100}, size:{100, 100}, textPosition:lstTextPosn, text:{alignment:center, text:"bug: off center"}}
	end tell
end tell
 
The version was 5.2.3

There seems to be a read problem as well as a write problem.
Applescript reports the textPosition of a Circle created this way as {0, 0} but the inspector reveals it to actually have X and Y offsets of -10% and -15% respectively ...



(This persists if default styles are reset in the GUI).

--

Last edited by RobTrew; 2011-05-26 at 08:23 AM.. Reason: Added observation of a read problem (in addn to the write problem)
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to FIND text in columns that have the type property set to "pop-up list" qomni OmniOutliner 3 for Mac 20 2013-12-04 03:18 PM
How to change text property uburoifr OmniGraffle for iPad 1 2010-05-04 08:38 AM
Oriented circles? senseiwa OmniGraffle General 8 2008-11-11 09:41 AM
Overlapping Circles Eddy OmniGraffle General 0 2007-08-08 07:31 AM


All times are GMT -8. The time now is 08:45 AM.


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