Skip to content

Commit 0b0b504

Browse files
committed
Update mimbl version + cosmetic changes
1 parent b48d686 commit 0b0b504

File tree

4 files changed

+23
-38
lines changed

4 files changed

+23
-38
lines changed
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "js-framework-benchmark-mimbl",
3-
"version": "0.1.6",
3+
"version": "0.1.8",
44
"description": "Benchmark for Mimbl framework",
55
"js-framework-benchmark": {
66
"frameworkVersionFromPackage": "mimbl"
@@ -10,6 +10,7 @@
1010
"build-prod": "webpack -p"
1111
},
1212
"keywords": [
13+
"benchmark",
1314
"mimbl"
1415
],
1516
"author": "Michael Michlin",
@@ -20,13 +21,13 @@
2021
"url": "https://github.com/krausest/js-framework-benchmark.git"
2122
},
2223
"devDependencies": {
23-
"source-map-loader": "^0.2.4",
24-
"ts-loader": "^6.1.0",
25-
"typescript": "^3.6.3",
24+
"source-map-loader": "0.2.4",
25+
"ts-loader": "6.1.0",
26+
"typescript": "3.6.3",
2627
"webpack": "4.34.0",
27-
"webpack-cli": "^3.3.4"
28+
"webpack-cli": "3.3.4"
2829
},
2930
"dependencies": {
30-
"mimbl": "^0.1.6"
31+
"mimbl": "0.1.8"
3132
}
3233
}

frameworks/keyed/mimbl/src/Main.tsx

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,6 @@ export class Main extends mim.Component implements IMainContainer
3232
{
3333
super();
3434

35-
this.add = this.add.bind(this);
36-
this.run = this.run.bind(this);
37-
this.update = this.update.bind(this);
38-
this.runLots = this.runLots.bind(this);
39-
this.clear = this.clear.bind(this);
40-
this.swapRows = this.swapRows.bind(this);
41-
4235
this.store = new Store();
4336
this.tbody = new TBody( this);
4437

@@ -49,52 +42,58 @@ export class Main extends mim.Component implements IMainContainer
4942
// this.callMe( () => stopMeasure(), false);
5043
// }
5144

52-
run() {
45+
run = () =>
46+
{
5347
// startMeasure("run");
5448
this.tbody.run();
5549
// this.schedulePrintDuration();
5650
}
5751

58-
add() {
52+
add = () =>
53+
{
5954
// startMeasure("add");
6055
this.tbody.add();
6156
// this.schedulePrintDuration();
6257
}
6358

64-
update() {
59+
update = () =>
60+
{
6561
// startMeasure("update");
6662
this.tbody.update();
6763
// this.schedulePrintDuration();
6864
}
6965

70-
runLots() {
66+
runLots = () =>
67+
{
7168
// startMeasure("runLots");
7269
this.tbody.runLots();
7370
// this.schedulePrintDuration();
7471
}
7572

76-
clear() {
73+
clear = () =>
74+
{
7775
// startMeasure("clear");
7876
this.tbody.clear();
7977
this.tbody = new TBody( this);
8078
this.updateMe();
8179
// this.schedulePrintDuration();
8280
}
8381

84-
swapRows() {
82+
swapRows = () =>
83+
{
8584
// startMeasure("swapRows");
8685
this.tbody.swapRows();
8786
// this.schedulePrintDuration();
8887
}
8988

90-
onSelectRowClicked(row)
89+
onSelectRowClicked( row)
9190
{
9291
// startMeasure("select");
9392
this.tbody.onSelectRowClicked(row);
9493
// this.schedulePrintDuration();
9594
}
9695

97-
onDeleteRowClicked(row)
96+
onDeleteRowClicked( row)
9897
{
9998
// startMeasure("delete");
10099
this.tbody.onDeleteRowClicked(row);

frameworks/keyed/mimbl/src/Row.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ export class Row extends mim.Component
2525
this.id = id;
2626
this.label = label;
2727
this.selected = false;
28-
29-
this.onDeleteClicked = this.onDeleteClicked.bind(this);
30-
this.onSelectClicked = this.onSelectClicked.bind(this);
3128
}
3229

3330
setItem( newLabel: string, newSelectedID: number)
@@ -49,12 +46,12 @@ export class Row extends mim.Component
4946
this.selected = selected;
5047
}
5148

52-
onDeleteClicked()
49+
onDeleteClicked = () =>
5350
{
5451
this.main.onDeleteRowClicked( this);
5552
}
5653

57-
onSelectClicked()
54+
onSelectClicked = () =>
5855
{
5956
if (this.selected)
6057
return;

frameworks/keyed/mimbl/src/TBody.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,6 @@ export class TBody extends mim.Component
4949
}
5050

5151
swapRows() {
52-
// this.store.swapRows( 1, 998);
53-
// this.store.data.forEach( (item, i) => {
54-
// if (this.rows[i].id !== item.id)
55-
// {
56-
// if (this.store.selected === item.id)
57-
// this.selectedRow = undefined;
58-
59-
// this.rows[i] = new Row( this.main, item.id, item.label);
60-
// }
61-
// });
62-
// this.updateMe();
63-
6452
if (this.rows.length > 998)
6553
{
6654
this.store.swapRows( 1, 998);

0 commit comments

Comments
 (0)