TextFlow paddingLeft not working when using RTL and dynamic width
I having a problem with the rendering of a TextFlow object when using RTL text direction and dynamic width (NaN) in the assigned controller. The problem does not occur when using LTR text or when using a fixed width in the controller. Here are some pictures showing the problem:
This one is using RTL text direction and dynamic with:

And this one is using LTR text direction and dynamic with:

In both cases the text was rendered using this code:
var container:Sprite = new Sprite;
var flow:TextFlow = TextConverter.importToFlow(markup, TextConverter.TEXT_FIELD_HTML_FORMAT);
var controller:* = new ContainerController(container, message_width, message_height);
flow.paddingTop = layout.messages.padding_top * stage.stageHeight;
flow.paddingBottom = layout.messages.padding_bottom * stage.stageHeight;
flow.paddingLeft = layout.messages.padding_left * stage.stageWidth;
flow.paddingRight = layout.messages.padding_right * stage.stageWidth;
flow.direction = layout.messages.text_direction;
flow.flowComposer.addController(controller);
flow.flowComposer.updateAllControllers();
if(isNaN(message_width)) {
message_width = int(layout.messages.padding_left * stage.stageWidth +
layout.messages.padding_right * stage.stageWidth +
container.width);
}
if(isNaN(message_height)) {
message_height = int(layout.messages.padding_top * stage.stageHeight +
layout.messages.padding_bottom * stage.stageHeight +
container.height);
}
container.graphics.beginFill(parseInt("0x" + layout.messages.background_color.slice(1)), layout.messages.background_opacity);
container.graphics.drawRect(0, 0, message_width, message_height);
container.graphics.endFill();
Any ideas? I looked at the TLF sources trying to find the problem but it resulted harder that I thought ![]()
Fran
