Fixed rects

This commit is contained in:
Eugene 2023-07-25 17:34:36 +03:00
parent 53e081435b
commit 22e238087c
4 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Spreadsheet example</title> <title>Spreadsheet example</title>
</head> </head>
<body> <body style="padding: 2rem;">
<div id="spreadsheet"></div> <div id="spreadsheet"></div>
<button id="save_button">Save sheet</button> <button id="save_button">Save sheet</button>
<button id="load_button">Load sheet</button> <button id="load_button">Load sheet</button>

View File

@ -1,7 +1,7 @@
{ {
"name": "modern_spreadsheet", "name": "modern_spreadsheet",
"private": false, "private": false,
"version": "0.0.25", "version": "0.0.27",
"exports": { "exports": {
".": { ".": {
"import": "./dist/main.js", "import": "./dist/main.js",

View File

@ -83,7 +83,7 @@ export class ColumnsBar {
this.ctx.fillStyle = isColSelected ? this.root.styles.cells.selectedBackground : 'white' this.ctx.fillStyle = isColSelected ? this.root.styles.cells.selectedBackground : 'white'
this.ctx.strokeStyle = 'black' this.ctx.strokeStyle = 'black'
this.ctx.lineWidth = this.resizerWidth this.ctx.lineWidth = this.resizerWidth
this.ctx.fillRect(x - this.root.viewport.left - 1, 1, width - 1, this.height - 1) this.ctx.fillRect(x - this.root.viewport.left + 1, 1, width - 1, this.height - 1)
this.ctx.strokeRect(x - this.root.viewport.left, 0, width, this.height) this.ctx.strokeRect(x - this.root.viewport.left, 0, width, this.height)
} }

View File

@ -70,7 +70,7 @@ export class RowsBar {
this.ctx.strokeStyle = 'black' this.ctx.strokeStyle = 'black'
this.ctx.lineWidth = this.resizerHeight this.ctx.lineWidth = this.resizerHeight
this.ctx.fillRect(0 + 1, y - this.root.viewport.top, this.width + 1, height) this.ctx.fillRect(0 + 1, y - this.root.viewport.top, this.width + 1, height)
this.ctx.strokeRect(0 + 1, y - this.root.viewport.top, this.width - 1, height) this.ctx.strokeRect(0, y - this.root.viewport.top, this.width - 1, height)
} }
private renderSingleRow(row: number) { private renderSingleRow(row: number) {