Skip to content

Commit

Permalink
Slightly change how scalebar is reloaded
Browse files Browse the repository at this point in the history
  • Loading branch information
mthh committed Jun 10, 2017
1 parent b43089e commit 45a38a3
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,7 @@ function parseQuery(search) {
lng: lang,
fallbackLng: existing_lang[0],
backend: {
loadPath: 'static/locales/{{lng}}/translation.7047e0a53d2c.json'
loadPath: 'static/locales/{{lng}}/translation.fe422493834d.json'
}
}, function (err, tr) {
if (err) {
Expand Down Expand Up @@ -15686,7 +15686,13 @@ function apply_user_preferences(json_pref) {
scaleBar.x = map_config.layout_features.scale_bar.x;
scaleBar.y = map_config.layout_features.scale_bar.y;
scaleBar.Scale._groups[0][0].setAttribute('transform', map_config.layout_features.scale_bar.transform);
scaleBar.update(); //scaleBar.resize();
// We should be able to avoid this condition and always use the same method
// but while waiting to test it more it may be safer to do it that way
if (scaleBar.fixed_size === false) {
scaleBar.update();
} else {
scaleBar.resize();
}
}
if (map_config.layout_features.north_arrow) {
northArrow.display();
Expand Down
8 changes: 7 additions & 1 deletion magrit_app/static/js/map_project.js
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,13 @@ function apply_user_preferences(json_pref){
scaleBar.x = map_config.layout_features.scale_bar.x;
scaleBar.y = map_config.layout_features.scale_bar.y;
scaleBar.Scale._groups[0][0].setAttribute('transform', map_config.layout_features.scale_bar.transform);
scaleBar.update(); //scaleBar.resize();
// We should be able to avoid this condition and always use the same method
// but while waiting to test it more it may be safer to do it that way
if (scaleBar.fixed_size === false) {
scaleBar.update();
} else {
scaleBar.resize();
}
}
if (map_config.layout_features.north_arrow) {
northArrow.display();
Expand Down
4 changes: 2 additions & 2 deletions magrit_app/templates/modules.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<title> {{ app_name }} </title>
<link rel="icon" type="image/png" href="static/img/favicon.png" />
<link href="static/css/scoped-bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="static/css/style.7047e0a53d2c.min.css" rel="stylesheet" type="text/css">
<link href="static/css/style.fe422493834d.min.css" rel="stylesheet" type="text/css">
<link href="static/css/vanilla-dataTables.min.css" rel="stylesheet" type="text/css">
<link href="static/css/alertify.min.css" rel="stylesheet" type="text/css">
<link href="static/css/semantic.min.css" rel="stylesheet" type="text/css">
Expand Down Expand Up @@ -51,6 +51,6 @@
</div>
</noscript>
<script src="static/js/lib/bootstrap-native3.mod.min.js"></script>
<script src="static/js/app.7047e0a53d2c.js"></script>
<script src="static/js/app.fe422493834d.js"></script>
</body>
</html>

0 comments on commit 45a38a3

Please sign in to comment.