Skip to content

Commit e584151

Browse files
remove capitalization image's ls conf attributes
1 parent e75eccf commit e584151

File tree

4 files changed

+81
-82
lines changed

4 files changed

+81
-82
lines changed

client/assets/localScripts/Image.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ module.exports = class Image {
2828
this.popupUI = null;
2929
this.imgMapGPS = null;
3030

31-
if (!this.conf.GPS_Coord) {
32-
this.conf.GPS_Coord = {};
31+
if (!this.conf.gpsCoord) {
32+
this.conf.gpsCoord = {};
3333
}
3434
}
3535

@@ -73,7 +73,7 @@ module.exports = class Image {
7373
if (this.imgMapGPS) {
7474
this.imgMapGPS.remove();
7575
}
76-
if (!this.conf.GPS_Coord.checked) return false;
76+
if (!this.conf.gpsCoord.checked) return false;
7777
const mapImg = document.createElement('img');
7878
const _this = this;
7979
mapImg.addEventListener('load', function () {
@@ -199,8 +199,8 @@ module.exports = class Image {
199199
}
200200

201201
createCanvasDrawed(img, ratioX = null, ratioY = null) {
202-
const lat = this.conf.GPS_Coord.Lat || 0;
203-
const lng = this.conf.GPS_Coord.Lng || 0;
202+
const lat = this.conf.gpsCoord.lat || 0;
203+
const lng = this.conf.gpsCoord.lng || 0;
204204

205205
ratioX = ratioX || (lng - leftIP) / (rightIP - leftIP);
206206
ratioY = ratioY || 1 - (lat - bottomIP) / (topIP - bottomIP);
@@ -227,11 +227,11 @@ module.exports = class Image {
227227
}
228228

229229
ratioToCoordinates(ratioX, ratioY) {
230-
const Lng = leftIP + ratioX * (rightIP - leftIP);
231-
const Lat = bottomIP + ratioY * (topIP - bottomIP);
230+
const lng = leftIP + ratioX * (rightIP - leftIP);
231+
const lat = bottomIP + ratioY * (topIP - bottomIP);
232232
return {
233-
Lng: Lng,
234-
Lat: Lat,
233+
lng: lng,
234+
lat: lat,
235235
};
236236
}
237237

client/assets/prefabs/Image.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"factorWidth": 3,
1616
"factorHeight": 3,
1717
"map_path": "./assets/img/uploaded/8DA2C1D5-2E2A-4A52-8681-44044E78D171.jpeg",
18-
"GPS_Coord": { "Lng": null, "Lat": null, "Checked": false }
18+
"gpsCoord": { "lng": null, "lat": null, "checked": false }
1919
},
2020
"Audio": {
2121
"sounds": ["open_popup", "close_popup"],

0 commit comments

Comments
 (0)