Skip to content

Commit

Permalink
fix: readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dineug committed Jan 7, 2024
1 parent 7a76aed commit f389c45
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 8 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
- [Web App](https://erd-editor.io)
- [VSCode Extension](https://marketplace.visualstudio.com/items?itemName=dineug.vuerd-vscode)
- [Editing Guide](https://docs.erd-editor.io/docs/category/guides)
- [API](https://docs.erd-editor.io/docs/api/erd-editor-element)
2 changes: 1 addition & 1 deletion packages/erd-editor-app/src/utils/text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function toWidth(text: string) {
const canvasContext = getCanvasContext();
const width = canvasContext
? canvasContext.measureText(text).width
: text.length * 11;
: text.length * 10;

return Math.round(width) + TEXT_PADDING;
}
6 changes: 0 additions & 6 deletions packages/erd-editor-vscode-webview/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title>erd-editor</title>
<link nonce="{{nonce}}" href="{{webview.css}}" rel="stylesheet" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap"
rel="stylesheet"
/>
</head>
<body>
<script nonce="{{nonce}}" src="{{webview.js}}" defer></script>
Expand Down
2 changes: 1 addition & 1 deletion packages/erd-editor-vscode/src/utils/text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function toWidth(text: string) {

width = (advance / font.unitsPerEm) * SIZE;
} else {
width = text.length * 11;
width = text.length * 10;
}

return Math.round(width) + TEXT_PADDING;
Expand Down
1 change: 1 addition & 0 deletions packages/erd-editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,3 +348,4 @@ editor.setTheme({...});
- [Web App](https://erd-editor.io)
- [VSCode Extension](https://marketplace.visualstudio.com/items?itemName=dineug.vuerd-vscode)
- [Editing Guide](https://docs.erd-editor.io/docs/category/guides)
- [API](https://docs.erd-editor.io/docs/api/erd-editor-element)

0 comments on commit f389c45

Please sign in to comment.