Skip to content

Commit 9508881

Browse files
committed
- fix bug: 0 wasn't shown when set cell content. fix this by checking
`!(textContent?)` instead of `!(textContent)`.
1 parent 1d9e411 commit 9508881

File tree

8 files changed

+29
-17
lines changed

8 files changed

+29
-17
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Change Logs
22

3+
## v0.1.4
4+
5+
- fix bug: `0` wasn't shown when set cell content. fix this by checking `!(textContent?)` instead of `!(textContent)`.
6+
7+
38
## v0.1.3
49

510
- add `data(d)` api

dist/index.js

Lines changed: 7 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "@plotdb/sheet",
44
"license": "MIT",
55
"description": "spreadsheet",
6-
"version": "0.1.3",
6+
"version": "0.1.4",
77
"main": "dist/index.js",
88
"homepage": "https://github.com/plotdb/sheet",
99
"files": [

src/index.ls

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,13 @@ sheet.prototype = Object.create(Object.prototype) <<< do
246246
else if x < @xif.col.1 => [null, "cell fixed"]
247247
else if y < @xif.row.1 => [null, "cell fixed"]
248248
else if x < @xif.col.2 and y < @xif.row.2 =>
249-
[@_data[][y - @xif.row.1][x - @xif.col.1] or '', "cell frozen fixed"]
249+
[@_data[][y - @xif.row.1][x - @xif.col.1], "cell frozen fixed"]
250250
else if x < @xif.col.2 =>
251-
[@_data[][@pos.row + y - @xif.row.1][x - @xif.col.1] or '', "cell frozen"]
251+
[@_data[][@pos.row + y - @xif.row.1][x - @xif.col.1], "cell frozen"]
252252
else if y < @xif.row.2 =>
253-
[@_data[][y - @xif.row.1][@pos.col + x - @xif.col.1] or '', "cell frozen"]
254-
else [@_data[][@pos.row + y - @xif.row.1][@pos.col + x - @xif.col.1] or '', "cell"]
253+
[@_data[][y - @xif.row.1][@pos.col + x - @xif.col.1], "cell frozen"]
254+
else [@_data[][@pos.row + y - @xif.row.1][@pos.col + x - @xif.col.1], "cell"]
255+
if !(textContent?) => textContent = ""
255256
256257
n.className = className
257258
if textContent != null => n.textContent = textContent

web/static/assets/lib/@plotdb/sheet/dev/index.js

Lines changed: 7 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/static/assets/lib/@plotdb/sheet/dev/index.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)