Refactor things out of util with limited use, move more to service

This commit is contained in:
Bryan Housel
2018-12-21 11:56:55 -05:00
parent 4eb0e4b3a4
commit f7150004c0
11 changed files with 216 additions and 291 deletions
-44
View File
@@ -1,11 +1,9 @@
import { dispatch as d3_dispatch } from 'd3-dispatch';
import {
event as d3_event,
select as d3_select
} from 'd3-selection';
import { svgIcon } from '../svg';
import { errorTypes } from '../util';
import { t, textDirection } from '../util/locale';
import { tooltip } from '../util/tooltip';
import { geoExtent } from '../geo';
@@ -18,8 +16,6 @@ import { uiTooltipHtml } from './tooltipHtml';
export function uiMapData(context) {
var dispatch = d3_dispatch('change');
var key = t('map_data.key');
var features = context.features().keys();
var layers = context.layers();
@@ -485,46 +481,6 @@ export function uiMapData(context) {
}
function drawQAButtons(selection) {
var QAButtons = d3_select('.layer-QA').selectAll('li').select('label').select('input');
var buttonSection = selection.selectAll('.QA-buttons')
.data([0]);
// var buttonSection = selection.selectAll('.QA-buttons')
// .data([0]);
// // exit
// buttonSection.exit()
// .remove();
// // enter
// var buttonEnter = buttonSection.enter()
// .append('div')
// .attr('class', 'QA-buttons');
// buttonEnter
// .append('button')
// .attr('class', 'button QA-toggle-on action')
// .text(t('QA.keepRight.toggle-on'))
// .on('click', function() {
// QAButtons.property('checked', true);
// dispatch.call('change');
// });
// buttonEnter
// .append('button')
// .attr('class', 'button QA-toggle-off action')
// .text(t('QA.keepRight.toggle-off'))
// .on('click', function() {
// QAButtons.property('checked', false);
// dispatch.call('change');
// });
// buttonSection = buttonSection
// .merge(buttonEnter);
}
function drawListItems(selection, data, type, name, change, active) {
var items = selection.selectAll('li')
.data(data);