faustedition / faust-gen

Site generation for the Faustedition
http://beta.faustedition.net/
3 stars 0 forks source link

Tooltip for ×× and ×...× passages #22

Open gerritbruening opened 7 years ago

gerritbruening commented 7 years ago

Corresponding to the tooltip in the textual rendering, "(ungefähr) ... unlesbare Zeichen".

See https://faustedition.uni-wuerzburg.de/wiki/index.php/Feedback_zur_Beta_1#Seminar_Goethes_Faust:_Entstehung_und_Edition

Test case:

wissenbach commented 7 years ago

fixed by 0d7eb8abbfdb4f3935d8d3a79833c41a0e31fbaa

wissenbach commented 7 years ago

Tooltip is visible, but there is no explicit "unreadable" information displayed, so I'm reopening the bug.

thvitt commented 7 years ago

Chris' tooltip generation code creates the tooltip HTML from the class attributes of children of g.text-wrapper.

This is how the unclear information shows up in the SVG (from the test case above):

<g class="element-unclear unclear-cert-high" transform="matrix(1, 0, 0, 1, 18, 0)">
  <g class="text-wrapper" transform="matrix(1, 0, 0, 1, 0, 0)">
    <rect class="bgBox hand-g material-t normal" x="0" y="-16" height="21" width="10"/>
    <text class="text hand-g material-t normal">{</text>
  </g>
  <g class="text-wrapper" transform="matrix(1, 0, 0, 1, 5, 0)">
    <rect class="bgBox hand-g material-t normal" x="0" y="-16" height="21" width="60"/>
    <text class="text hand-g material-t normal">unclear</text>
  </g>
  <g class="text-wrapper" transform="matrix(1, 0, 0, 1, 53, 0)">
    <rect class="bgBox hand-g material-t normal" x="-1" y="-16" height="21" width="11"/>
    <text class="text hand-g material-t normal">}</text>
  </g>
</g>

so we'll probably need adjustments to look at ancestors of the .text-wrapper, as well