pnp / sp-dev-fx-aces

Repository for the Microsoft Viva Connections Adaptive Card sample solutions from Microsoft and community.
https://aka.ms/viva/connections/extensibility
MIT License
109 stars 92 forks source link

svg image not working on card view #181

Closed harshdamaniahd closed 3 weeks ago

harshdamaniahd commented 3 weeks ago

Hey I created an svg img dynamicaly and it does work on card view on mobile client. it works on web.

` public get data(): IImageCardParameters {

  return {
    iconProperty:this.properties.imageUrl,
    primaryText: this.properties.description,
    imageUrl: this.getSVG(),
    title: this.properties.title
  };

} public getSVG(): string { let images=this.state.images;

    return svgToTinyDataUri(`<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300" viewBox="0 0 300 300" preserveAspectRatio="xMidYMid meet">
    <!-- Top-left image -->
    <image href="${images[0]}" x="0" y="0" width="150" height="150"/>
    <!-- Top-right image -->
    <image href="${images[1]}" x="150" y="0" width="150" height="150"/>
    <!-- Bottom-left image -->
    <image href="${images[2]}" x="0" y="150" width="150" height="150"/>
    <!-- Bottom-right image -->
    <image href="${images[3]}" x="150" y="150" width="150" height="150"/>
</svg>

`
);

}`

dcashpeterson commented 3 weeks ago

@harshdamaniahd Thanks for your interests in Adaptive Card extensions. Is this question in regards to a specific sample? If it is a general question about developing ACEs the best place for this is SP Dev Docs. This sounds like the following issue that has previously been reported. https://github.com/SharePoint/sp-dev-docs/issues/7735

harshdamaniahd commented 3 weeks ago

ok i can raise the issue there . thank you