NathanaelA / fluentreports

:page_facing_up: Fluent Reports - Data Driven Reporting Engine for Node.js and Browsers :page_facing_up:
https://fluentreports.com
MIT License
375 stars 84 forks source link

[FRG] Alignment on Print elements does not align within assigned box #228

Closed beauwest closed 4 years ago

beauwest commented 4 years ago

Consider this element definition

{"text":"Welcome to FluentReports","type":"print","settings":{"align":"center","width":234,"absoluteX":234,"absoluteY":0}}

Steps to generate:

  1. Create a new Print element & change the text
  2. Set the width to 234
  3. Set the X to 234
  4. Change the alignment to "Center"

The expectation, is that I would have a print that is half the width of my page, aligned to the right-hand side of my page. But then the text would be centered within the right-hand "column" on my page.

The result: Screen Shot 2020-10-08 at 12 02 01 PM

NathanaelA commented 4 years ago

This is fixed in the next version. The Text Box (i.e. 234 pixels text width/wrapping area) is moved to the proper alignment, and the text inside the text width/wrapping area is aligned to the proper alignment. (Demo34 shows the output of a fixed width text box with alignments)

NathanaelA commented 4 years ago

Fixed in 1.3.8