Skip to content

Commit

Permalink
Merge pull request #4999 from archesproject/4990_geojson_edit_tool
Browse files Browse the repository at this point in the history
 enhancements to geojson editor tool
  • Loading branch information
robgaston committed Jul 12, 2019
2 parents fe178d6 + 0de3d3f commit 92c95c0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions arches/app/templates/views/components/map-editor.htm
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ <h4 class="map-card-sidepanel-header" data-bind="click: hideSidePanel, text: car

<!-- ko if: geoJSONString() !== undefined -->
<div class="card">
<div class="geojson-editor" data-bind="codemirror: { value: geoJSONString, mode: { name: 'javascript', json: true }, theme: 'monokai' }"></div>
<div class="geojson-editor" data-bind="codemirror: {
value: geoJSONString,
mode: { name: 'javascript', json: true },
lineNumbers: true
}"></div>
<div class="install-buttons">
<button class="btn btn-shim btn-danger btn-labeled btn-lg fa fa-times" data-bind="click: function () {
geoJSONString(undefined);
Expand Down Expand Up @@ -170,23 +174,23 @@ <h5 data-bind="text: card.model.instructions"></h5>
<!-- /ko -->
</tbody>
</table>
<!-- ko if: self.featureLookup[widget.node_id()].features().length > 0 -->
<div class="map-card-zoom-tool">
<a href="javascript:void(0);" data-bind="click: function() {
self.editGeoJSON(self.featureLookup[widget.node_id()].features(), widget.node_id());
}">
<i class="fa fa-pencil map-card-feature-edit"></i>
{% trans "Edit GeoJSON" %}
</a>
<!-- ko if: self.featureLookup[widget.node_id()].features().length > 0 -->
|
<a href="javascript:void(0);" data-bind="click: function() {
self.fitFeatures(self.featureLookup[widget.node_id()].features());
}">
<i class="fa fa-search map-card-feature-edit"></i>
{% trans "Zoom to all features" %}
</a>
<!-- /ko -->
</div>
<!-- /ko -->
</div>
</div>
</div>
Expand Down

0 comments on commit 92c95c0

Please sign in to comment.