diff --git a/CHANGES.rst b/CHANGES.rst index 8fa84b642..456206044 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,12 @@ Changes ======= +0.5.2 (2017-09-13) +------------------ + +- Fix graticule style edition. + + 0.5.1 (2017-09-08) ------------------ diff --git a/magrit_app/__init__.py b/magrit_app/__init__.py index 12e50bc06..e31af5452 100755 --- a/magrit_app/__init__.py +++ b/magrit_app/__init__.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- -__version__ = '0.5.1' +__version__ = '0.5.2' diff --git a/magrit_app/static/css/style.f844169ffade.min.css b/magrit_app/static/css/style.5c4f7a9a6db2.min.css similarity index 100% rename from magrit_app/static/css/style.f844169ffade.min.css rename to magrit_app/static/css/style.5c4f7a9a6db2.min.css diff --git a/magrit_app/static/js/app.f844169ffade.js b/magrit_app/static/js/app.5c4f7a9a6db2.js similarity index 99% rename from magrit_app/static/js/app.f844169ffade.js rename to magrit_app/static/js/app.5c4f7a9a6db2.js index f28b44b2a..f1799e3e4 100644 --- a/magrit_app/static/js/app.f844169ffade.js +++ b/magrit_app/static/js/app.5c4f7a9a6db2.js @@ -1135,7 +1135,7 @@ function parseQuery(search) { lng: lang, fallbackLng: _app.existing_lang[0], backend: { - loadPath: 'static/locales/{{lng}}/translation.f844169ffade.json' + loadPath: 'static/locales/{{lng}}/translation.5c4f7a9a6db2.json' } }, function (err, tr) { if (err) { @@ -12351,8 +12351,8 @@ function createStyleBoxLabel(layer_name) { function createStyleBoxGraticule(layer_name) { check_remove_existing_box('.styleBox'); var current_params = cloneObj(current_layers.Graticule); - var selection = map.select('#Graticule > path'); - var selection_strokeW = map.select('#Graticule'); + var selection = map.select('#L_Graticule > path'); + var selection_strokeW = map.select('#L_Graticule'); make_confirm_dialog2('styleBox', layer_name, { top: true, widthFitContent: true, draggable: true }).then(function (confirmed) { if (confirmed) { @@ -12400,11 +12400,11 @@ function createStyleBoxGraticule(layer_name) { var step_val = +this.value; var dasharray_val = +document.getElementById('graticule_dasharray_txt').value; current_layers.Graticule.step = step_val; - map.select('#Graticule').remove(); - map.append('g').attrs({ id: 'Graticule', class: 'layer' }).append('path').datum(d3.geoGraticule().step([step_val, step_val])).attrs({ class: 'graticule', d: path, 'clip-path': 'url(#clip)' }).styles({ fill: 'none', stroke: current_layers.Graticule.fill_color.single, 'stroke-dasharray': dasharray_val }); + map.select('#L_Graticule').remove(); + map.append('g').attrs({ id: 'L_Graticule', class: 'layer' }).append('path').datum(d3.geoGraticule().step([step_val, step_val])).attrs({ class: 'graticule', d: path, 'clip-path': 'url(#clip)' }).styles({ fill: 'none', stroke: current_layers.Graticule.fill_color.single, 'stroke-dasharray': dasharray_val }); zoom_without_redraw(); - selection = map.select('#Graticule').selectAll('path'); - selection_strokeW = map.select('#Graticule'); + selection = map.select('#L_Graticule').selectAll('path'); + selection_strokeW = map.select('#L_Graticule'); svg_map.insertBefore(selection_strokeW.node(), next_layer); popup.select('#graticule_step_txt').attr('value', step_val); }); @@ -12433,7 +12433,7 @@ function createStyleBoxGraticule(layer_name) { step_val = +document.getElementById('graticule_step_txt').value, dasharray_val = +document.getElementById('graticule_dasharray_txt').value; var graticule = d3.geoGraticule().step([step_val, step_val]); - map.select('#Graticule').remove(); + map.select('#L_Graticule').remove(); if (this.checked) { var bbox_layer = _target_layer_file.bbox; var extent_grat = [[Math.round((bbox_layer[0] - 12) / 10) * 10, Math.round((bbox_layer[1] - 12) / 10) * 10], [Math.round((bbox_layer[2] + 12) / 10) * 10, Math.round((bbox_layer[3] + 12) / 10) * 10]]; @@ -12447,10 +12447,10 @@ function createStyleBoxGraticule(layer_name) { } else { current_layers.Graticule.extent = undefined; } - map.append('g').attrs({ id: 'Graticule', class: 'layer' }).append('path').datum(graticule).attrs({ class: 'graticule', d: path, 'clip-path': 'url(#clip)' }).styles({ fill: 'none', stroke: current_layers.Graticule.fill_color.single, 'stroke-dasharray': dasharray_val }); + map.append('g').attrs({ id: 'L_Graticule', class: 'layer' }).append('path').datum(graticule).attrs({ class: 'graticule', d: path, 'clip-path': 'url(#clip)' }).styles({ fill: 'none', stroke: current_layers.Graticule.fill_color.single, 'stroke-dasharray': dasharray_val }); zoom_without_redraw(); - selection = map.select('#Graticule').selectAll('path'); - selection_strokeW = map.select('#Graticule'); + selection = map.select('#L_Graticule').selectAll('path'); + selection_strokeW = map.select('#L_Graticule'); svg_map.insertBefore(selection_strokeW.node(), next_layer); }); clip_extent_section.append('label').attrs({ for: 'clip_graticule' }).html(i18next.t('app_page.layer_style_popup.graticule_clip')); diff --git a/magrit_app/static/js/layers_style_popup.js b/magrit_app/static/js/layers_style_popup.js index 869acc8d6..7396ce60a 100755 --- a/magrit_app/static/js/layers_style_popup.js +++ b/magrit_app/static/js/layers_style_popup.js @@ -415,8 +415,8 @@ function createStyleBoxLabel(layer_name) { function createStyleBoxGraticule(layer_name) { check_remove_existing_box('.styleBox'); const current_params = cloneObj(current_layers.Graticule); - let selection = map.select('#Graticule > path'); - let selection_strokeW = map.select('#Graticule'); + let selection = map.select('#L_Graticule > path'); + let selection_strokeW = map.select('#L_Graticule'); make_confirm_dialog2('styleBox', layer_name, { top: true, widthFitContent: true, draggable: true }) .then((confirmed) => { @@ -482,16 +482,16 @@ function createStyleBoxGraticule(layer_name) { const step_val = +this.value; const dasharray_val = +document.getElementById('graticule_dasharray_txt').value; current_layers.Graticule.step = step_val; - map.select('#Graticule').remove(); + map.select('#L_Graticule').remove(); map.append('g') - .attrs({ id: 'Graticule', class: 'layer' }) + .attrs({ id: 'L_Graticule', class: 'layer' }) .append('path') .datum(d3.geoGraticule().step([step_val, step_val])) .attrs({ class: 'graticule', d: path, 'clip-path': 'url(#clip)' }) .styles({ fill: 'none', stroke: current_layers.Graticule.fill_color.single, 'stroke-dasharray': dasharray_val }); zoom_without_redraw(); - selection = map.select('#Graticule').selectAll('path'); - selection_strokeW = map.select('#Graticule'); + selection = map.select('#L_Graticule').selectAll('path'); + selection_strokeW = map.select('#L_Graticule'); svg_map.insertBefore(selection_strokeW.node(), next_layer); popup.select('#graticule_step_txt').attr('value', step_val); }); @@ -531,7 +531,7 @@ function createStyleBoxGraticule(layer_name) { step_val = +document.getElementById('graticule_step_txt').value, dasharray_val = +document.getElementById('graticule_dasharray_txt').value; let graticule = d3.geoGraticule().step([step_val, step_val]); - map.select('#Graticule').remove(); + map.select('#L_Graticule').remove(); if (this.checked) { const bbox_layer = _target_layer_file.bbox; const extent_grat = [ @@ -549,14 +549,14 @@ function createStyleBoxGraticule(layer_name) { current_layers.Graticule.extent = undefined; } map.append('g') - .attrs({ id: 'Graticule', class: 'layer' }) + .attrs({ id: 'L_Graticule', class: 'layer' }) .append('path') .datum(graticule) .attrs({ class: 'graticule', d: path, 'clip-path': 'url(#clip)' }) .styles({ fill: 'none', stroke: current_layers.Graticule.fill_color.single, 'stroke-dasharray': dasharray_val }); zoom_without_redraw(); - selection = map.select('#Graticule').selectAll('path'); - selection_strokeW = map.select('#Graticule'); + selection = map.select('#L_Graticule').selectAll('path'); + selection_strokeW = map.select('#L_Graticule'); svg_map.insertBefore(selection_strokeW.node(), next_layer); }); clip_extent_section.append('label') diff --git a/magrit_app/static/locales/en/translation.f844169ffade.json b/magrit_app/static/locales/en/translation.5c4f7a9a6db2.json similarity index 100% rename from magrit_app/static/locales/en/translation.f844169ffade.json rename to magrit_app/static/locales/en/translation.5c4f7a9a6db2.json diff --git a/magrit_app/static/locales/es/translation.f844169ffade.json b/magrit_app/static/locales/es/translation.5c4f7a9a6db2.json similarity index 100% rename from magrit_app/static/locales/es/translation.f844169ffade.json rename to magrit_app/static/locales/es/translation.5c4f7a9a6db2.json diff --git a/magrit_app/static/locales/fr/translation.f844169ffade.json b/magrit_app/static/locales/fr/translation.5c4f7a9a6db2.json similarity index 100% rename from magrit_app/static/locales/fr/translation.f844169ffade.json rename to magrit_app/static/locales/fr/translation.5c4f7a9a6db2.json diff --git a/magrit_app/templates/modules.html b/magrit_app/templates/modules.html index 2f2a075d9..0c8e019fd 100755 --- a/magrit_app/templates/modules.html +++ b/magrit_app/templates/modules.html @@ -7,7 +7,7 @@ {{ app_name }} - + @@ -51,6 +51,6 @@ - +