@corpsmap/corpsmap 3.2.74 → 3.2.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +10 -2
- package/css/corpsmap.css +9688 -9688
- package/lib/assets/index-42a6cd56.css +10185 -0
- package/lib/dev.js +89835 -83467
- package/lib/prod.js +88514 -83465
- package/package.json +34 -27
- package/rollup.config.js +23 -21
- package/src/application-bundles/api-bundle.js +34 -32
- package/src/core-plugins/add-data/bundle.js +1 -1
- package/src/core-plugins/coordinate-display/bundle.js +189 -166
- package/src/core-plugins/basemap-switcher/basemap-switcher-list-item copy.js +0 -59
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { connect } from 'redux-bundler-react';
|
|
3
|
-
import classnames from "classnames";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class BasemapItem extends React.Component {
|
|
7
|
-
handleClick = () => {
|
|
8
|
-
const { idx, doChangeBasemap } = this.props;
|
|
9
|
-
doChangeBasemap(idx);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
render() {
|
|
13
|
-
const { active, basemap, basemapImages, theme } = this.props;
|
|
14
|
-
let tileurl = basemap.url.replace(/{[a-z]-[a-z]}/gi, "a");
|
|
15
|
-
tileurl = tileurl.replace("{z}", "12");
|
|
16
|
-
tileurl = tileurl.replace("{x}", "1206");
|
|
17
|
-
tileurl = tileurl.replace("{y}", "1539");
|
|
18
|
-
|
|
19
|
-
const itemClass = classnames({
|
|
20
|
-
"cm-list-group-item": true,
|
|
21
|
-
"pointer": true,
|
|
22
|
-
[theme]: active
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
let basemapUI = null;
|
|
26
|
-
//looking to set src.
|
|
27
|
-
basemapImages.every((imageID) =>{
|
|
28
|
-
if( basemap.id === imageID){
|
|
29
|
-
console.log(basemap.id)
|
|
30
|
-
basemapUI =
|
|
31
|
-
(<li onClick={this.handleClick} className={itemClass} title={basemap.name}>
|
|
32
|
-
<div className="overflow-ellipsis">
|
|
33
|
-
<img src={basemap.altImage} width="40" height="40" alt={`Basemap tile for ${basemap.name}`} />
|
|
34
|
-
<span style={{marginLeft:'10px'}}>{basemap.name}</span>
|
|
35
|
-
</div>
|
|
36
|
-
</li>)
|
|
37
|
-
return false
|
|
38
|
-
}else{
|
|
39
|
-
basemapUI = (
|
|
40
|
-
<li onClick={this.handleClick} className={itemClass} title={basemap.name}>
|
|
41
|
-
<div className="overflow-ellipsis">
|
|
42
|
-
<img src={tileurl} width="40" height="40" alt={`Basemap tile for ${basemap.name}`} />
|
|
43
|
-
<span style={{marginLeft:'10px'}}>{basemap.name}</span>
|
|
44
|
-
</div>
|
|
45
|
-
</li>
|
|
46
|
-
);
|
|
47
|
-
return true
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
return basemapUI
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export default connect(
|
|
55
|
-
'selectTheme',
|
|
56
|
-
'doChangeBasemap',
|
|
57
|
-
'selectBasemapImages',
|
|
58
|
-
BasemapItem
|
|
59
|
-
);
|