TLF - Edit image

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

TLF - Edit image

hugo
Hello,

To insert an image in TLF I'm using the following function from EditManager
insertInlineGraphic.
This works as expected.

For edit purpose (change width, height or position left/right), I'm using
modifyInlineGraphic (right click on
the image > context menu > and then change).
This works only if the cursor is blinking before the image because
EditManager works with the cursor position.

The typical user will not expect to change the cursor imediatally to
position before the image do edit.
Anyone knows a way to workaround this issue ?

Regards,
Hugo.




--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: TLF - Edit image

After24
Hi Hugo,

I believe that the modifyInlineGraphic method needs the selectionSate to
operate properly, you should try something like this :

/var state:SelectionState = new SelectionState(textFlow,
inlineGraphicElement.getAbsoluteStart(),
inlineGraphicElement.getAbsoluteStart() + 1);
editManager.modifyInlineGraphic(inlineGraphicElement.source,
inlineGraphicElement.width, inlineGraphicElement.height, null, state);
editManager.setFocus();/

Cheers.

Vincent.




--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: TLF - Edit image

hugo
Hi After24,

That make sense and I believe that will work however, there is still missing
a piece of the puzzle.
How to find the inlineGraphicElement him self.

The user may edit the image later so we don't have the inlineGraphicElement
object, we need to search first (however we have the original Sprite because
the user start from there/right click to edit).

The image that I have is a Sprite with embeded image from bytearray that was
converted to InlineGraphicElement by the insert method.

I could manage a separate array with all pares for Sprites and
InlineGraphicElements but I think that would not work after the user save
and load the TLF (I didn't implement that part because this is a new TLF
editor that I'm bullding right now).

Any ideas ?

Regards,
Hugo.



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/