Page MenuHomec4science

textfield.component.html
No OneTemporary

File Metadata

Created
Tue, May 21, 00:48

textfield.component.html

<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
[attr.viewBox]="viewBox" [attr.height]="svg_height" [attr.width]="svg_width"
class = 'textfield'>
<svg:g *ngIf="image">
<image [attr.xlink:href]="image.file_name" x="0" y="0" [attr.height]="image.height" [attr.width]="image.width"/>
</svg:g>
<svg:g *ngFor="let word of words">
<svg:g *ngIf="!image">
<svg:text [attr.x]="word.left+2"
[attr.y]="word.top+word.height/2+3"
[attr.textLength]="word.width-4"
lengthAdjust="spacingAndGlyphs"
[ngClass]="{'text_fadeout': assignTextClass(word)}">
{{word.text}}
</svg:text>
</svg:g>
<svg:rect [interactedWord]="word"
[ngClass]="{
'textfield unhighlighted': true,
'textfield highlight': assignClass(0, word),
'textfield border': assignClass(1, word)
}"
[attr.x]="word.left" [attr.y]="word.top" [attr.height]="word.height" [attr.width]="word.width">
<title *ngIf="image">{{word.text}}</title>
</svg:rect>
</svg:g>
</svg>

Event Timeline