You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Phil Wright <ph...@gmail.com> on 2006/11/29 02:52:16 UTC
Dragging a block of text (in a flowRoot element)
I am trying to drag the blocks of text displayed on my canvas around with
the mouse. I'm using flowRoot elements to contain the multiple lines of
text.
Unfortunately they don't want to be dragged. :) It was easy enough to get
the graphic elements like rectangles and circles to drag around but even
though I update the rect element inside the flowRegion the text doesn't move
unless I reload the page. At which point it is in the correct spot.
Is it because the X,Y location I'm changing is deep inside the flowRoot
element and it doesn't generate some kind of trickle-up notification to the
canvas display?
I tried putting the flowRoot element into a g element along with a rect and
then repositioning the rect but that didn't work.
Any suggestions on a way to do this? Is there some kind of positionable
element that I can wrap the flowRoot into?
Thanks,
Phil
--
Visit http://www.darkisle.com for photos of castles, cairns and other
historic sites in the British Isles.
Re: Dragging a block of text (in a flowRoot element)
Posted by Phil Wright <ph...@gmail.com>.
Hi Thomas,
On 11/29/06, thomas.deweese@kodak.com <th...@kodak.com> wrote:
>
> > Any suggestions on a way to do this? Is there some kind of positionable
>
> > element that I can wrap the flowRoot into?
>
> Yes, the 'g' element can be positioned using it's 'transform'
> attribute, this should work w/o a problem (and actually is more
> efficient as it won't trigger a relayout of the text):
>
> <g transform="translate(10,20)">
> <flowRoot ...
Excellent!
Thanks!
Phil
--
Visit http://www.darkisle.com for photos of castles, cairns and other
historic sites in the British Isles.
Re: Dragging a block of text (in a flowRoot element)
Posted by th...@kodak.com.
Hi Phil,
"Phil Wright" <ph...@gmail.com> wrote on 11/28/2006 08:52:16 PM:
> I am trying to drag the blocks of text displayed on my canvas around
with the
> mouse. I'm using flowRoot elements to contain the multiple lines of
text.
>
> Unfortunately they don't want to be dragged. :) It was easy enough to
get
> the graphic elements like rectangles and circles to drag around but even
> though I update the rect element inside the flowRegion the text doesn't
move
> unless I reload the page. At which point it is in the correct spot.
>
> Is it because the X,Y location I'm changing is deep inside the flowRoot
> element and it doesn't generate some kind of trickle-up notification to
the
> canvas display?
Yes, this is probably the problem.
> Any suggestions on a way to do this? Is there some kind of positionable
> element that I can wrap the flowRoot into?
Yes, the 'g' element can be positioned using it's 'transform'
attribute, this should work w/o a problem (and actually is more
efficient as it won't trigger a relayout of the text):
<g transform="translate(10,20)">
<flowRoot ...
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org