Fix loading of images from OpenStreetCam API, add viewer

\o/
This commit is contained in:
Bryan Housel
2017-11-03 16:48:18 -04:00
parent 00b30e29f0
commit 6dd71ebf91
5 changed files with 124 additions and 150 deletions
+22 -3
View File
@@ -8,9 +8,9 @@ import { d3keybinding as d3_keybinding } from '../lib/d3.keybinding.js';
import { t, textDirection } from '../util/locale';
import { tooltip } from '../util/tooltip';
import { svgDefs, svgIcon } from '../svg/index';
import { modeBrowse } from '../modes/index';
import { behaviorHash } from '../behavior/index';
import { svgDefs, svgIcon } from '../svg';
import { modeBrowse } from '../modes';
import { behaviorHash } from '../behavior';
import { utilGetDimensions } from '../util/dimensions';
import { uiAccount } from './account';
@@ -238,6 +238,25 @@ export function uiInit(context) {
.call(uiContributors(context));
var photoviewer = content
.append('div')
.attr('id', 'photoviewer')
.classed('al', true) // 'al'=left, 'ar'=right
.classed('hide', true);
photoviewer
.append('button')
.attr('class', 'thumb-hide')
.on('click', function () {
d3_select('#photoviewer')
.classed('hide', true)
.select('div')
.classed('hide', true);
})
.append('div')
.call(svgIcon('#icon-close'));
window.onbeforeunload = function() {
return context.save();
};