Skip to content

Commit e556313

Browse files
Update to v1.1.3
1 parent 89a6876 commit e556313

2 files changed

Lines changed: 15 additions & 12 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.1.3] - 2024-11-19
11+
12+
### Fixed
13+
14+
- Allow width and height to be deleted
15+
1016
## [1.1.2] - 2024-10-23
1117

1218
### Fixed
@@ -134,6 +140,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
134140
- Press and hold calibration corners to slow down movement
135141

136142
[unreleased]: https://github.com/Pattern-Projector/pattern-projector/compare/main...beta
143+
[1.1.3]: https://github.com/Pattern-Projector/pattern-projector/releases/tag/v1.1.3
137144
[1.1.2]: https://github.com/Pattern-Projector/pattern-projector/releases/tag/v1.1.2
138145
[1.1.1]: https://github.com/Pattern-Projector/pattern-projector/releases/tag/v1.1.1
139146
[1.1.0]: https://github.com/Pattern-Projector/pattern-projector/releases/tag/v1.1.0

app/[locale]/calibrate/page.tsx

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -185,18 +185,14 @@ export default function Page() {
185185

186186
function handleHeightChange(e: ChangeEvent<HTMLInputElement>) {
187187
const h = removeNonDigits(e.target.value, height);
188-
if (Number(h) > 0) {
189-
setHeight(h);
190-
updateLocalSettings({ height: h });
191-
}
188+
setHeight(h);
189+
updateLocalSettings({ height: h });
192190
}
193191

194192
function handleWidthChange(e: ChangeEvent<HTMLInputElement>) {
195193
const w = removeNonDigits(e.target.value, width);
196-
if (Number(w) > 0) {
197-
setWidth(w);
198-
updateLocalSettings({ width: w });
199-
}
194+
setWidth(w);
195+
updateLocalSettings({ width: w });
200196
}
201197

202198
function handleFileChange(e: ChangeEvent<HTMLInputElement>): void {
@@ -235,8 +231,8 @@ export default function Page() {
235231
}
236232
const m = getPerspectiveTransformFromPoints(
237233
points,
238-
Number(width),
239-
Number(height),
234+
Number(width) > 0 ? Number(width) : 1,
235+
Number(height) > 0 ? Number(height) : 1,
240236
getPtDensity(unitOfMeasure),
241237
false,
242238
);
@@ -283,8 +279,8 @@ export default function Page() {
283279
if (points.length === maxPoints) {
284280
const m = getPerspectiveTransformFromPoints(
285281
points,
286-
Number(width),
287-
Number(height),
282+
Number(width) > 0 ? Number(width) : 1,
283+
Number(height) > 0 ? Number(height) : 1,
288284
getPtDensity(unitOfMeasure),
289285
false,
290286
);

0 commit comments

Comments
 (0)