Can we have a svg type node
Hi there,
I was playing with svg image in my app, but faced few problems which I've shared in my previous forums.
I'm rendering svg type images in image type node, i was thinking that if we have a svg type node then it would be more helpful to maintain its aspect ratio, we can change its colors too.
However I also tried native type node to render svg images. But I realized that native type node was working fine if svg has single tag. if there is an svg with more than one tag and different tags like it contains, g element, group g elements ore something else. then that native type node was unable to handle it. Also if svg width and height is 1000px. Native type node was able to render it but it was unable to handle resize it. also one svg colors were effecting other svgs. Does it make sense? can we have specific svg type node which can manage all scenarios or any other alternate?
However I also tried native type node to render svg images. But I realized that native type node was working fine if svg has single tag. if there is an svg with more than one tag and different tags like it contains, g element, group g elements ore something else. then that native type node was unable to handle it. Also if svg width and height is 1000px. Native type node was able to render it but it was unable to handle resize it. also one svg colors were effecting other svgs. Does it make sense? can we have specific svg type node which can manage all scenarios or any other alternate?
SIGN IN To post a reply.
3 Replies
SG
Shyam G
Syncfusion Team
December 14, 2017 10:20 AM UTC
Hi Ahman,
Please use native node to render SVG element. Also you can use multiple tags in SVG template and it will be rendered properly with our native node. please refer to the playground link below. Still if you face any problems with the SVG template, please share us more details such as modify the below playground link or share us an SVG template.
Playground link: http://jsplayground.syncfusion.com/rutgmk4j
Regards,
Shyam G
AH
ahman
December 14, 2017 04:15 PM UTC
Hi there,
| Response | Query |
Please use native node to render SVG element. Also you can use multiple tags in SVG template and it will be rendered properly with our native node. please refer to the playground link below. Still if you face any problems with the SVG template, please share us more details such as modify the below playground link or share us an SVG template. Playground link: http://jsplayground.syncfusion.com/rutgmk4j | I've added my SVG images in playground: Playground link: http://jsplayground.syncfusion.com/rutgmk4j steps to produce issues: 1. cut code from left panel, then paste it again. on right side, the behavior of SVG on right side will be different 2. On right panel, copy and paste SVG, the behavior will be different. 3. for 2 minutes play with the SVGS :) like drag and drop them, copy and paste them etc. Issues I noticed: 1. SVG text color is effecting whole its area. 2. I can't see text inside SVG, its just showing dark area 3. If you copy paste SVG its size is increased until you click on it |
| Can I achieve editable graphics thing? like if i upload any logo image or svg logo image but later on if i want change it's text inside the diagram, is it possible? don't wanna use diagram label feature. |
SG
Shyam G
Syncfusion Team
December 15, 2017 01:06 PM UTC
Hi Ahman,
|
Query |
Response |
|
I've added my SVG images in playground: Playground link: http://jsplayground.syncfusion.com/rutgmk4j steps to produce issues: 1. cut code from left panel, then paste it again. on right side, the behavior of SVG on right side will be different. |
|
|
2. On right panel, copy and paste SVG, the behavior will be different. |
Could you please confirm whether an SVG node position, appearance changes while performing clipboard operation. Also please share us how the behavior differs in your sample with SVG node while performing clipboard operation. could you please share us more details such as video to demonstrate the behavior changes. |
|
3. for 2 minutes play with the SVGS :) like drag and drop them, copy and paste them etc. Issues I noticed: 1. SVG text color is effecting whole its area. 2. I can't see text inside SVG, its just showing dark area 3. If you copy paste SVG its size is increased until you click on it. |
Could you please share your SVG template which you are using in the sample and video to demonstrate the issue. The playground link shared by you is the same which we shared to you in our earlier update. So please share your playground link |
|
Can I achieve editable graphics thing? like if i upload any logo image or svg logo image but later on if i want change it's text inside the diagram, is it possible? don't wanna use diagram label feature. |
Playground link: http://jsplayground.syncfusion.com/4voqav2r
|
Regards,
Shyam G
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
AH ahman
- Dec 13, 2017 12:39 PM UTC
- Dec 15, 2017 01:06 PM UTC