Commit cd7dfb7d authored by Andy Castille's avatar Andy Castille
Browse files

the map window is speedy now

parent ca53c7df
Pipeline #52481806 passed with stages
in 7 minutes and 34 seconds
......@@ -13,10 +13,10 @@ prefix:
- npm install -g autoprefixer-cli
- autoprefixer-cli web/files/css/**/*.css
.compile:
compile:
stage: build
image: google/dart:latest
before_script:
script:
# Set the correct server host
- echo "Client will connect to the game server at "
# - echo $([ "$CI_COMMIT_REF_NAME" == "master" ] && echo $SRV_PROD || echo $SRV_DEV ) | tee web/server_domain.txt
......@@ -26,20 +26,11 @@ prefix:
- pub get
# Build
- pub global activate webdev
- webdev build --verbose
artifacts:
paths:
- build/
compile_prod:
extends: .compile
script:
- webdev build --release --verbose
compile_dev:
extends: .compile
script:
- webdev build --no-release --verbose
.upload:
stage: deploy
image: mwienk/docker-lftp:latest
......
......@@ -3,4 +3,7 @@ targets:
builders:
json_serializable:
options:
generate_to_json_function: true
\ No newline at end of file
generate_to_json_function: true
build_web_compilers|dart_source_cleanup:
release_options:
enabled: false
......@@ -11,6 +11,9 @@ class MapData {
@JsonKey(name: "render")
Map<String, Map<String, Map<String, dynamic>>> renderData = {};
@JsonKey(name: "streets_by_id")
Map<String, String> streetIdsToNames = {};
static Completer<bool> load = new Completer();
MapData();
......@@ -49,16 +52,7 @@ class MapData {
}
// Gets the name of the street with the given TSID
String getLabel(String tsid) {
int i = 0;
for (Map data in streetData.values) {
if (data["tsid"] != null && tsidL(data["tsid"]) == tsidL(tsid)) {
return streetData.keys.toList()[i];
}
i++;
}
return "";
}
String getLabel(String tsid) => streetIdsToNames[tsidL(tsid)];
// Returns a list of all hub names
List<String> get hubNames {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment