Moved the custom background code into ui/settings

We are going to add a bunch more of these setting screens
This commit is contained in:
Bryan Housel
2018-08-11 01:18:30 -04:00
parent 5367e97874
commit cde4caf168
5 changed files with 9 additions and 9 deletions

View File

@@ -15,6 +15,7 @@ export * from './svg/index';
export * from './ui/fields/index';
export * from './ui/intro/index';
export * from './ui/panels/index';
export * from './ui/settings/index';
export * from './ui/index';
export * from './util/index';
export * from './lib/index';

View File

@@ -17,12 +17,12 @@ import { svgIcon } from '../svg';
import { uiBackgroundDisplayOptions } from './background_display_options';
import { uiBackgroundOffset } from './background_offset';
import { uiCmd } from './cmd';
import { uiCustom } from './custom';
import { uiDisclosure } from './disclosure';
import { uiHelp } from './help';
import { uiMapData } from './map_data';
import { uiMapInMap } from './map_in_map';
import { uiModal } from './modal';
import { uiSettingsCustomBackground } from './settings/custom_background';
import { uiTooltipHtml } from './tooltipHtml';
import { utilCallWhenIdle } from '../util';
import { tooltip } from '../util/tooltip';
@@ -90,7 +90,6 @@ export function uiBackground(context) {
function chooseBackground(d) {
if (d.id === 'custom' && !d.template()) {
return editCustom();
}
d3_event.preventDefault();
@@ -116,7 +115,7 @@ export function uiBackground(context) {
d3_event.preventDefault();
context.container()
.call(uiCustom(context));
.call(uiSettingsCustomBackground(context));
}
@@ -153,7 +152,7 @@ export function uiBackground(context) {
.placement((textDirection === 'rtl') ? 'right' : 'left')
)
.on('click', editCustom)
.call(svgIcon('#iD-icon-edit'));
.call(svgIcon('#iD-icon-more'));
enter.filter(function(d) { return d.best(); })
.append('div')

View File

@@ -11,7 +11,6 @@ export { uiCommitChanges } from './commit_changes';
export { uiCommitWarnings } from './commit_warnings';
export { uiConfirm } from './confirm';
export { uiConflicts } from './conflicts';
export { uiCustom } from './custom';
export { uiContributors } from './contributors';
export { uiCurtain } from './curtain';
export { uiDisclosure } from './disclosure';

View File

@@ -1,9 +1,9 @@
import { t } from '../util/locale';
import { uiBackground } from './background';
import { uiModal } from './modal';
import { t } from '../../util/locale';
import { uiBackground } from '../background';
import { uiModal } from '../modal';
export function uiCustom(context) {
export function uiSettingsCustomBackground(context) {
return function(selection) {

View File

@@ -0,0 +1 @@
export { uiSettingsCustomBackground } from './custom_background';