Fix eslint issues, remove console.logs

This commit is contained in:
Bryan Housel
2018-05-25 17:08:17 -04:00
parent 91dbd6c9c4
commit c621d5ecaf
2 changed files with 10 additions and 22 deletions
+7 -14
View File
@@ -1,20 +1,11 @@
import _filter from 'lodash-es/filter';
import _find from 'lodash-es/find';
import _flatten from 'lodash-es/flatten';
import _forEach from 'lodash-es/forEach';
import _isEmpty from 'lodash-es/isEmpty';
import _map from 'lodash-es/map';
import _some from 'lodash-es/some';
import _union from 'lodash-es/union';
import { range as d3_range } from 'd3-array';
import { dispatch as d3_dispatch } from 'd3-dispatch';
import {
request as d3_request,
json as d3_json
} from 'd3-request';
import {
select as d3_select,
selectAll as d3_selectAll
@@ -31,7 +22,6 @@ import { utilQsString, utilRebind } from '../util';
var bubbleApi = 'https://dev.virtualearth.net/mapcontrol/HumanScaleServices/GetBubbles.ashx?';
var streetsideImagesApi = 'https://t.ssl.ak.tiles.virtualearth.net/tiles/';
var bubbleAppKey = 'AuftgJsO0Xs8Ts4M1xZUQJQXJNsvmh3IV8DkNieCiy3tCwCUMq76-WpkrBtNAuEm';
var acctId = '1402191';
var pannellumViewerCss = 'pannellum-streetside/pannellum.css';
var pannellumViewer = 'pannellum-streetside/pannellum.js';
var tileZoom = 16.5;
@@ -427,11 +417,14 @@ export default {
bubbleIdQuadKey = '0' + bubbleIdQuadKey;
}
// bhousel todo check this
if (!window.pannellum) return;
// Order matters here: front=01, right=02, back=03, left=10, up=11, down=12
var imgLocIdxArr = ['01','02','03','10','11','12'];
var imgUrlPrefix = streetsideImagesApi + 'hs' + bubbleIdQuadKey;
var imgUrlSuffix = '.jpg?g=6338&n=z';
pannellum.viewer('viewer-streetside', {
window.pannellum.viewer('viewer-streetside', {
type: 'cubemap',
cubeMap: [
imgUrlPrefix + imgLocIdxArr[0] + imgUrlSuffix,
@@ -473,9 +466,9 @@ export default {
.classed('hovered', function (d) { return d.key === hoveredBubbleKey; })
.classed('selected', function (d) { return d.key === selectedBubbleKey; });
d3_selectAll('.layer-streetside-images .sequence')
.classed('highlighted', function (d) { return d.properties.key === hoveredSequenceKey; })
.classed('selected', function (d) { return d.properties.key === selectedSequenceKey; });
// d3_selectAll('.layer-streetside-images .sequence')
// .classed('highlighted', function (d) { return d.properties.key === hoveredSequenceKey; })
// .classed('selected', function (d) { return d.properties.key === selectedSequenceKey; });
return this;
},
+3 -8
View File
@@ -3,6 +3,7 @@ import { select as d3_select } from 'd3-selection';
import { svgPath, svgPointTransform } from './index';
import { services } from '../services';
export function svgStreetside(projection, context, dispatch) {
var throttledRedraw = _throttle(function () { dispatch.call('change'); }, 1000);
var minZoom = 16;
@@ -18,7 +19,6 @@ export function svgStreetside(projection, context, dispatch) {
if (svgStreetside.initialized) return; // run once
svgStreetside.enabled = false;
svgStreetside.initialized = true;
console.log("svg: streetside initialized....");
}
/**
@@ -39,7 +39,6 @@ export function svgStreetside(projection, context, dispatch) {
* showLayer().
*/
function showLayer() {
console.log('svg - streetside - showLayer()');
var service = getService();
if (!service) return;
@@ -91,7 +90,6 @@ export function svgStreetside(projection, context, dispatch) {
* click() Handles 'bubble' point click event.
*/
function click(d) {
console.log("svg: map was clicked with streetside on. Passed obj: ", d);
var service = getService();
if (!service) return;
@@ -133,7 +131,6 @@ export function svgStreetside(projection, context, dispatch) {
* update().
*/
function update() {
console.log("svg - update()");
var viewer = d3_select('#photoviewer');
var selected = viewer.empty() ? undefined : viewer.datum();
var z = ~~context.map().zoom();
@@ -212,9 +209,8 @@ export function svgStreetside(projection, context, dispatch) {
* 'svgStreetside()' is called from index.js
*/
function drawImages(selection) {
//console.log("svg - streetside - drawImages(); selection: ", selection);
var enabled = svgStreetside.enabled,
service = getService();
var enabled = svgStreetside.enabled;
var service = getService();
layer = selection.selectAll('.layer-streetside-images')
.data(service ? [0] : []);
@@ -250,7 +246,6 @@ export function svgStreetside(projection, context, dispatch) {
* drawImages.enabled().
*/
drawImages.enabled = function(_) {
//console.log('svg - streetside - drawImages.enabled()');
if (!arguments.length) return svgStreetside.enabled;
svgStreetside.enabled = _;
if (svgStreetside.enabled) {