Chore: frontend infrastructure upgrade (#16420)
Co-authored-by: NFish <douxc512@gmail.com> Co-authored-by: zxhlyh <jasonapring2015@outlook.com> Co-authored-by: twwu <twwu@dify.ai> Co-authored-by: jZonG <jzongcode@gmail.com>
This commit is contained in:
parent
e61415223b
commit
7709d9df20
1435 changed files with 13372 additions and 11612 deletions
|
|
@ -38,8 +38,8 @@ export const SVGRenderer = ({ content }: { content: string }) => {
|
|||
if (!(svgElement instanceof SVGElement))
|
||||
throw new Error('Invalid SVG content')
|
||||
|
||||
const originalWidth = parseInt(svgElement.getAttribute('width') || '400', 10)
|
||||
const originalHeight = parseInt(svgElement.getAttribute('height') || '600', 10)
|
||||
const originalWidth = Number.parseInt(svgElement.getAttribute('width') || '400', 10)
|
||||
const originalHeight = Number.parseInt(svgElement.getAttribute('height') || '600', 10)
|
||||
draw.viewbox(0, 0, originalWidth, originalHeight)
|
||||
|
||||
svgRef.current.style.width = `${Math.min(originalWidth, 298)}px`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue