Hello,
I am attempting to insert a small image next to the text as the content on all the diagram shapes using Server-side programming. I have attempted the following on 'code behind'.
DiagramShape.ContentSettings.Html = "<img src=\"" + path + "\"/>" + text;
As i understand, the diagram gets rendered using SVG, and this <img> gets replaced with an svg <image> tag and the proper attributes. The svg image elements look fine, however multiple shapes often have the same path in my case, and only the first instance of each path actually results in the image being displayed (all subsequent instances have height=0 and width=0).
Anyone ideas on how to make this work? Or how to achieve the desired effect using server-side programming?
<
g
transform
=
"matrix(1,0,0,1,540,0)"
>
<
path
d
=
"M0 0 L 90 0 90 30 0 30Z"
stroke-width
=
"0"
fill
=
"#428bca"
transform
=
"matrix(1,0,0,1,0,0)"
></
path
>
<
g
transform
=
"matrix(1,0,0,1,7,7.5)"
>
<
g
transform
=
"matrix(1,0,0,1,1000000,1000000)"
>
<
g
>
<
g
clip-path
=
"url(#kdef29)"
></
g
>
<
text
style
=
"font:normal normal normal 11px Tahoma, Arial, sans-serif;"
x
=
"-999984"
y
=
"-999987"
stroke
=
"none"
fill
=
"rgb(51, 51, 51)"
>text1</
text
>
<
g
>
<
g
clip-path
=
"url(#kdef30)"
></
g
>
<
image
preserveAspectRatio
=
"none"
x
=
"-1000000"
y
=
"-1000000"
width
=
"16px"
height
=
"13px"
xmlns:xlink
=
"http://www.w3.org/1999/xlink"
xlink:href
=
"/folder/image.gif"
clip-path
=
"url(#kdef31)"
></
image
>
</
g
></
g
></
g
></
g
></
g
> </
p
>
<g transform="matrix(1,0,0,1,540,0)"><path d="M0 0 L 90 0 90 30 0 30Z" stroke-width="0" fill="#428bca" transform="matrix(1,0,0,1,0,0)"></path><g transform="matrix(1,0,0,1,7,7.5)"><g transform="matrix(1,0,0,1,1000000,1000000)"><g><g clip-path="url(#kdef29)"></g><text style="font:normal normal normal 11px Tahoma, Arial, sans-serif;" x="-999984" y="-999987" stroke="none" fill="rgb(51, 51, 51)">Introduction</text><g><g clip-path="url(#kdef30)"></g><image preserveAspectRatio="none" x="-1000000" y="-1000000" width="16px" height="13px" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost:51758/CourseAuthoring_WebApp/theme/default/common/icons/s_1Media1TextJump_sm.gif" clip-path="url(#kdef31)"></image></g></g></g></g></g>
Thank you very much,
Jason