Fix: () => { } -> function() { }

This commit is contained in:
2018-09-13 15:13:14 +09:00
parent dad83205cd
commit e8c7304dba
22 changed files with 108 additions and 101 deletions
+17 -13
View File
@@ -17,7 +17,7 @@ class Start {
// top ui
let screenTopUI = new ScreenTopUI();
screenTopUI.makeBackButton( () => {
screenTopUI.makeBackButton( function() {
if(isTypingPracticeStage())
location.href = '../../web/client/menu_typing_practice.html';
else if(isTypingTestStage())
@@ -54,11 +54,11 @@ class Start {
sessionStorageManager.maestroID,
sessionStorageManager.playerID,
sessionStorageManager.playingAppID,
replyJSON => {
function(replyJSON) {
sessionStorageManager.bestRecord = Number(replyJSON["BestRecord"]);
screenBottomUI.printLeftTextWithBestRecord(sessionStorageManager.bestRecord);
},
replyJSON => { // no data
function(replyJSON) { // no data
sessionStorageManager.bestRecord = 0;
screenBottomUI.printLeftTextWithBestRecord(sessionStorageManager.bestRecord);
}
@@ -66,26 +66,30 @@ class Start {
}
loadHowToPlay(appID) {
let self = this;
this.dbConnectManager.requestHowToPlay(
sessionStorageManager.playingAppID, // space_invaders app ID
(jsonData) => {
function(jsonData) {
let howToPlayText = jsonData["HowToPlay"].replace(/\\n/g, "\n");
this.howToPlay.printHowToPlay(howToPlayText);
self.howToPlay.printHowToPlay(howToPlayText);
},
(jsonData) => {
this.howToPlay.printHowToPlay("No data");
function(jsonData) {
self.howToPlay.printHowToPlay("No data");
}
);
}
loadChart() {
let self = this;
let today = new Date();
let date = DateUtil.getYYYYMMDD(today);
this.dbConnectManager.requestPlayerHistory(
sessionStorageManager.maestroID,
date,
historyRecordManager => {
(function(historyRecordManager) {
if(historyRecordManager.count == 0) {
console.log("start - history record : no data");
return;
@@ -103,7 +107,7 @@ class Start {
// break;
let historyRecord = historyRecordManager.getAt(i);
this.chart.drawRecordGraph(
self.chart.drawRecordGraph(
i,
historyRecord === undefined ? "-" : historyRecord.date,
historyRecord === undefined ? "" : historyRecord.bestRecord,
@@ -111,8 +115,8 @@ class Start {
);
}
this.chart.printChartBaseLine();
}
self.chart.printChartBaseLine();
})
);
}
@@ -154,9 +158,9 @@ class Start {
let rankingButton = new RoundRectButton(
setting, RoundRectButton.NONE_ICON, "순위\n보기",
() => {
(function() {
location.href = '../../web/client/ranking.html';
}
})
);
if(sessionStorageManager.maestroAccountType == 100)
rankingButton.inputEnabled = false;