adaptlearning / adapt-contrib-narrative

A component that displays an image gallery with accompanying text
GNU General Public License v3.0
5 stars 39 forks source link

FW Issue #2620. Narrative item widths now add up to 100%. #197

Closed jamesrea83 closed 3 years ago

jamesrea83 commented 4 years ago

#2620

oliverfoster commented 4 years ago

I'm worried item[1] will still have this issue.

Because:

With 3 items, the total width is still 300% of the container. Each item is now 33.33% instead of 1/3%. Item 0 has the difference between 100-(33.33*3)=0.010000000000005116 added to it making the first item 33.34% wide.

[ 33.34, 33.33, 33.33 ] == 100

item[1] and item[2] are too short now when compared to the pixel width of the container (300%/3) and item[0] is too long.

As the narrative now slides to an item's offset position by suming the previous widths, sliding to item[1] will start at 33.34% but item[1] is too short when compared to the container width.

oliverfoster commented 3 years ago

doesn't work