Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101957238
textfield.component.html
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Feb 15, 14:21
Size
2 KB
Mime Type
image/svg
Expires
Mon, Feb 17, 14:21 (2 d)
Engine
blob
Format
Raw Data
Handle
24225983
Attached To
rSVGTESTAPP svg-test-app
textfield.component.html
View Options
<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
]="
svg_height
"
[
attr
.
width
]="
svg_width
"
class =
'textfield'
>
<svg:g
*
ngIf=
"image"
>
<image
[
attr
.
xlink:href
]="
image
"
x=
"0"
y=
"0"
[
attr
.
height
]="
imageSpec
.
height
"
[
attr
.
width
]="
imageSpec
.
width
"
/>
</svg:g>
<svg:g
*
ngIf=
"svg"
>
<image
[
attr
.
xlink:href
]="
svg
"
x=
"0"
y=
"0"
[
attr
.
height
]="
imageSpec
.
height
"
[
attr
.
width
]="
imageSpec
.
width
"
/>
</svg:g>
<svg:g
*
ngFor=
"let word of words"
>
<svg:g
*
ngIf=
"!image && !svg && markupAll"
>
<!-- Testing betting in whole markup component, so every word will be styled in the transcription-->
<foreignObject
[
attr
.
x
]="
word
.
left
+
2
"
[
attr
.
y
]="
word
.
top
"
[
attr
.
textLength
]="
word
.
width-4
"
lengthAdjust=
"spacingAndGlyphs"
[
ngClass
]="{'
text_fadeout
'
:
assignTextClass
(
word
)}"
>
<xhtml:div><app
-markup-text-component
[
textToStyle
]="
word
.
text
"
>
<
/app-markup-text-component>
</xhtml:div>
</foreignObject>
<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:g
*
ngIf=
"!image && !svg && !markupAll"
>
<!-- test over -->
<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
Log In to Comment