Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Change import names to be consistent - Change openlayers imports to have `Ol` prefix - Change imports with brackets to have no space

ZachTRiceb35c8af4e284
diff --git a/web/js/ol/lookupimagetile.js b/web/js/ol/lookupimagetile.js
index f977a1220..e752a6fb4 100644
--- a/web/js/ol/lookupimagetile.js
+++ b/web/js/ol/lookupimagetile.js
@@ -1,5 +1,5 @@
-import ImageTile from 'ol/imagetile';
-import TileState from 'ol/tilestate';
+import OlImageTile from 'ol/imagetile';
+import OlTileState from 'ol/tilestate';
class LookupImageTile extends ImageTile {
constructor(lookup, tileCoord, state, src, crossOrigin, tileLoadFunction) {
@@ -12,8 +12,8 @@ LookupImageTile.prototype.getImage = function() {
return this.canvas_;
};
LookupImageTile.prototype.load = function() {
- if (this.state === TileState.IDLE) {
- this.state = TileState.LOADING;
+ if (this.state === OlTileState.IDLE) {
+ this.state = OlTileState.LOADING;
var that = this;
var onImageLoad = function() {
that.canvas_ = document.createElement('canvas');
@@ -41,7 +41,7 @@ LookupImageTile.prototype.load = function() {
}
}
g.putImageData(imageData, 0, 0);
- that.state = TileState.LOADED;
+ that.state = OlTileState.LOADED;
that.changed();
that.image_.removeEventListener('load', onImageLoad);
};
diff --git a/web/js/stub.js b/web/js/stub.js
index 9996d275f..c7b7ed75b 100644
--- a/web/js/stub.js
+++ b/web/js/stub.js
@@ -1,7 +1,7 @@
/* This file is just a stub to test the browserify build task */
import $ from 'jquery';
-import { DateSelector } from 'worldview-components';
-import { parse as mapParser } from './map/map';
+import {DateSelector} from 'worldview-components';
+import {parse as mapParser} from './map/map';
import builder from './map/datelinebuilder';
import layerBuilder from './map/layerbuilder';
import animate from './map/animate';