Skip to content

Commit bc517b9

Browse files
committed
fix various js/html syntax. Start paper size selection/customisation
1 parent ead79aa commit bc517b9

File tree

8 files changed

+175
-96
lines changed

8 files changed

+175
-96
lines changed

desktopbraillerap.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@
3131
"OptimLevel":0,
3232
"Speed":6000,
3333
"Accel":1500,
34+
"PaperUsableSize":[
35+
{"name":"A4","usablewidth":210, "usableheight":250, "lock":True},
36+
{"name":"A3","usablewidth":297, "usableheight":420-47, "lock":True},
37+
{"name":"A4 (BrailleRAP)","usablewidth":190, "usableheight":250, "Lock":True}
38+
]
3439
}
3540

3641
# runtime option to automate some actions

public/logo192.png

61.3 KB
Loading

src/braillegeometry/DashIterator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class DashIterator
3535
return true;
3636
if (this.dash[0].length < 2)
3737
return true;
38-
if (this.dash[0][0] == 0 && this.dash[0][1] == 0)
38+
if (this.dash[0][0] === 0 && this.dash[0][1] === 0)
3939
return true;
4040
return false;
4141
}

src/components/AppOption.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ const AppOption = {
1111
Optimbloc:false,
1212
OptimLevel:0,
1313
Speed:6000,
14-
Accel:1500
14+
Accel:1500,
15+
PaperUsableSize:[
16+
{name:"A4",usablewidth:210, usableheight:250,lock:true},
17+
{name:"A3",usablewidth:297, usableheight:420-47,lock:true},
18+
{name:"A4 (BrailleRAP)",usablewidth:190, usableheight:250,lock:true}
19+
]
1520
}
1621

1722
export default AppOption;

src/components/DashMarker.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
1-
import { GiConsoleController } from "react-icons/gi";
21

32
const DashMarker = (props) => {
4-
let fcolor = "red";
3+
//let fcolor = "red";
54
let scolor = "black";
65
let size ="2rem";
76
let dashstyle = [[1,1]];
87
let total = 2;
98
let unit = 1;
10-
9+
/*
1110
const renderfill = (fill) => {
1211
if (fill)
1312
return `fill="${props.fill}"`;
1413
else
1514
return '';
1615
}
17-
16+
*/
17+
/*
1818
if (props.fillcolor) {
1919
fcolor = props.fillcolor;
2020
}
21+
*/
2122
if (props.strokecolor) {
2223
scolor = props.strokecolor;
2324
}

src/components/patternstrategy.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import patternssvg from '../patterns/packagesvg.json'
2-
31
class PatternStrategy
42
{
53
constructor ()
@@ -72,7 +70,7 @@ class PatternStrategy
7270
let valid = false;
7371
for (const assoc in this.pattern_association)
7472
{
75-
if (this.pattern_association[assoc] != -1)
73+
if (this.pattern_association[assoc] !== -1)
7674
{
7775
console.log ("strategy valided");
7876
valid = true;

0 commit comments

Comments
 (0)