Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVG image does not work on card view. #45

Open
harshdamaniahd opened this issue Jun 19, 2024 · 0 comments
Open

SVG image does not work on card view. #45

harshdamaniahd opened this issue Jun 19, 2024 · 0 comments

Comments

@harshdamaniahd
Copy link

I am dynamically creating an svg image on card view. it worked on desktop. but does not work from team's mobile app
eg of the code snipper

` 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>

`
);

}`

`
public get data(): IImageCardParameters {

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

}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant