🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #9743

Re: Release anchored objects of a story

#9743
From: Dave_Saunders
Date: Fri, 21 Jul 2006 19:40
15 lines
1237 bytes
Already a bug! As we discovered a few days ago, you can't use MoveTo to move a rotated object (at least, not if you want it to behave the way you'd expect). So:

Object.prototype.releaseAnchored = function() {
	if (this.parent.constructor.name != "Character") throw "Object is neither anchored nor inline"
	this.select(SelectionOptions.replaceWith);
	this.parent.parentStory.recompose();
	var myBounds = this.geometricBounds;
	app.cut();
	app.paste();
	var newBounds = app.selection[0].geometricBounds;
	app.selection[0].move(undefined,[myBounds[1] - newBounds[1], myBounds[0] - newBounds[0]]);
	return app.selection[0]
}

Dave
Technical Details
Message-ID: <3bc0fe9c.8@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!news.ecp.fr!news.stben.net!webcrossing
References: <3bc0fe9c.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,26971fcf4ed8261a
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Dave_Saunders@adobeforums.com
Newsgroups: adobe.scripting.indesign
Subject: Re: Release anchored objects of a story
Message-ID: <3bc0fe9c.8@webcrossing.la2eafNXanI>
Date: Fri, 21 Jul 2006 12:40:36 -0700
References: <3bc0fe9c.-1@webcrossing.la2eafNXanI>
Lines: 19
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!news.ecp.fr!news.stben.net!webcrossing