Forum Bugs

Can't access element from BoxInfo type : Line

JohannesHHL
After updating to prince12, I'm now unable to access the element of an BoxInfo object type: LINE.

Is there any changes to the Box tracking API, that could course this?


Here is the output of an simple object dump, using Prince12 and 11.1.

Prince 12
type: LINE
pageNum: 3
x: 54
y: 0
w: 91.62890625
h: 0
children: [object BoxInfoChildren]
parent: [object BoxInfo]
element: null
pseudo: null
text: null
src: null
style: null



Prince 11.1
type: LINE
pageNum: 3
x: 54
y: 0
w: 91.62890625
h: 0
children: [object BoxInfoChildren]
parent: [object BoxInfo]
element: [object HTMLParagraphElement]
mikeday
Yes, the older box tracking API had many redundant fields, the newer one does not. As a result the line does not directly link to the element it came from, but you can find it by checking the parent.
JohannesHHL
Wow, really great work with v12!

After converting our scripts to use the new box tracking API and especially the new style object, our post-rendering process is now half the time it used to take!

Prince 11.1	TotalSeconds      21,6118456

Prince 12	TotalSeconds      9,3340685
mikeday
That's excellent! There are always more things to optimise, but it's good to see improvement. :D