Skip to content

Commit

Permalink
map popup and workflow step style fixes, re: #4670
Browse files Browse the repository at this point in the history
  • Loading branch information
robgaston committed Jul 8, 2019
1 parent c36799e commit eb3cd0c
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 3 deletions.
6 changes: 5 additions & 1 deletion arches/app/media/css/arches.css
Original file line number Diff line number Diff line change
Expand Up @@ -531,10 +531,14 @@ input[type="checkbox"] {
.workflow-step-body {
background-color: #eee;
height: 100%;
padding: 20px 35px 300px 40px;
padding: 0 0 218px 0;
overflow-y: auto;
}

.padded-workflow-step {
padding: 35px;
}

.wf-multi-tile-step-container {
display: flex;
flex-direction: row;
Expand Down
3 changes: 3 additions & 0 deletions arches/app/media/js/views/components/cards/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ define([
type: 'FeatureCollection',
features: getDrawFeatures()
});
_.each(self.featureLookup, function(value) {
if (value.selectedTool()) value.selectedTool('');
});
});
});
},
Expand Down
5 changes: 4 additions & 1 deletion arches/app/media/js/views/components/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ define([
var mapLayers = params.mapLayers || arches.mapLayers;

this.map = ko.isObservable(params.map) ? params.map : ko.observable();
this.popupTemplate = popupTemplate;
this.basemaps = [];
this.overlays = ko.observableArray();
this.activeBasemap = ko.observable();
Expand Down Expand Up @@ -204,6 +205,8 @@ define([
resourceData['graph_name'] = '';
resourceData.featureCollections = [];
resourceData = ko.mapping.fromJS(resourceData);
resourceData.reportURL = arches.urls.resource_report;
resourceData.editURL = arches.urls.resource_editor;
resourceLookup[resourceId] = resourceData;
$.get(arches.urls.resource_descriptors + resourceId, function(data) {
resourceLookup[resourceId].displaydescription(data.displaydescription);
Expand Down Expand Up @@ -247,7 +250,7 @@ define([
if (hoverFeature) {
var p = new mapboxgl.Popup()
.setLngLat(e.lngLat)
.setHTML(popupTemplate)
.setHTML(self.popupTemplate)
.addTo(map);
ko.applyBindingsToDescendants(
self.getPopupData(hoverFeature),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="workflows-get-tile-value">
<div class="workflows-get-tile-value padded-workflow-step">
<div style='display:flex; justify-content: space-between;'>
<h4>Workflow Complete</h4>
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!-- ko let: { self: $data } -->
<div class="padded-workflow-step">
<!-- ko if: !loading() -->
<div data-bind="" class="wf-multi-tile-step-container">
<!-- ko if: tile() && card() -->
Expand Down Expand Up @@ -46,4 +47,5 @@ <h3>Add Reference Number</h3>
<!-- /ko -->
</div>
<!-- /ko -->
</div>
<!-- /ko -->
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<div class="padded-workflow-step">
<!-- ko if: tile() && card() -->
<!-- ko component: {
name: cardComponentLookup[card().model.component_id()].componentname,
Expand All @@ -11,3 +12,4 @@
}
} --><!-- /ko -->
<!-- /ko -->
</div>

0 comments on commit eb3cd0c

Please sign in to comment.