cutechicken commited on
Commit
2c5175d
·
verified ·
1 Parent(s): 8cc866b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -7,10 +7,12 @@ def create_preview_html(svg_path):
7
  try:
8
  with open(svg_path, 'r', encoding='utf-8') as f:
9
  svg_content = f.read()
10
- # SVG를 HTML로 감싸서 반환
11
  preview_html = f'''
12
- <div style="width:100%; height:100%; background-color: white; padding: 20px;">
13
- {svg_content}
 
 
14
  </div>
15
  '''
16
  return preview_html
 
7
  try:
8
  with open(svg_path, 'r', encoding='utf-8') as f:
9
  svg_content = f.read()
10
+ # SVG를 HTML로 감싸서 반환하되, 크기를 제어
11
  preview_html = f'''
12
+ <div style="width:100%; height:100%; background-color: white; padding: 20px; max-width: 800px; margin: 0 auto;">
13
+ <div style="width:100%; max-height:600px; overflow:auto;">
14
+ {svg_content.replace('<svg', '<svg style="width:100%; height:auto;"')}
15
+ </div>
16
  </div>
17
  '''
18
  return preview_html