Page MenuHomec4science

margin-field.component.html
No OneTemporary

File Metadata

Created
Sun, Dec 1, 13:46

margin-field.component.html

<svg xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
[attr.viewBox]="viewBox" [attr.height]="margin_height*local_zoom*zoomFactor" [attr.width]="margin_width*local_zoom*zoomFactor"
class = 'marginfield'>
<svg:g *ngFor="let line of lines">
<foreignObject *ngIf="showReference == 'from' && line.continuesFrom" [attr.x]="0" [attr.y]="line.bottom-line_height+1" [attr.height]="line_height" [attr.width]="2*line_length">
<xhtml:div><line-reference [showReference]="showReference" [line]="line"></line-reference></xhtml:div>
</foreignObject>
<svg:g *ngIf="line.number % 2 == 0 || hasWordsOnLine(line) ||
((getHoverStatus(line) == SELECTED_STATUS || getHoverStatus(line) == HOVERED_STATUS)
&& ((showReference != 'to' && line.continuesFrom) || (showReference == 'to' && line.continuesTo)))">
<svg:rect [attr.x]="line_x-1" [attr.y]="line.bottom-line_height+1"
[attr.height]="line_height" [attr.width]="line.number > 9 ? line_length + line_length/2 : line_length"
[ngStyle]="assignStyle(line, hoveredWord, hoveredLine, getHoverStatus(line))"
[ngClass]="{
'marginfield unhighlighted': getHoverStatus(line) != HOVERED_STATUS,
'marginfield highlight': getHoverStatus(line) == HOVERED_STATUS }" > </svg:rect>
<svg:text class="text" [attr.x]="line_x" [attr.y]="line.bottom" [container]="container"
[interactedObject]="line">{{line.number}}</svg:text>
</svg:g>
<foreignObject *ngIf="showReference == 'to' && line.continuesTo" [attr.x]="line_x+line_length" [attr.y]="line.bottom-line_height+1"
[attr.height]="line_height" [attr.width]="2*line_length">
<xhtml:div><line-reference [showReference]="showReference" [line]="line"></line-reference></xhtml:div>
</foreignObject>
</svg:g>
</svg>

Event Timeline