@corpsmap/corpsmap 3.2.51 → 3.2.52

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.
@@ -58,7 +58,6 @@ export default {
58
58
  const targetValue = evt.target.value
59
59
  // let logData = store.selectChangeLogItems();
60
60
  let logData = store.selectAllChangeLogItems();
61
- // debugger
62
61
  if(targetValue.length > 2){
63
62
  const wkLogData = []
64
63
  logData.forEach((item) =>{
@@ -1,174 +1,174 @@
1
- import React from "react";
2
- import { connect } from "redux-bundler-react";
3
- import classnames from "classnames";
4
- import DatasetInfo from "./dataset-info-modal";
5
- import DatasetLegend from "./dataset-legend";
6
- import _ from "lodash";
7
-
8
- class TreeListItemDataset extends React.Component {
9
- constructor(props) {
10
- super(props);
11
- this.state = {
12
- showLegend: false,
13
- visible: props.item.visible,
14
- displayName: props.item.displayName,
15
- hoverText: props.item.hoverText,
16
- type: props.item.type,
17
- expanded: false,
18
- };
19
-
20
- this.toggleVisible = this.toggleVisible.bind(this);
21
- this.zoomTo = this.zoomTo.bind(this);
22
- this.openMetadata = this.openMetadata.bind(this);
23
- this.renderInfoButton = this.renderInfoButton.bind(this);
24
- }
25
-
26
- toggleVisible() {
27
- const { item, doLayerSetVisible } = this.props;
28
- doLayerSetVisible(item.uid, !item.visible);
29
- }
30
-
31
- toggleExpanded = () => {
32
- const { doOpenLayerDetails, item } = this.props;
33
- doOpenLayerDetails(item);
34
- };
35
-
36
- zoomTo() {
37
- const { item, doZoomToLayerExtent } = this.props;
38
- doZoomToLayerExtent(item.uid);
39
- }
40
-
41
- openMetadata(inline) {
42
- const { doModalOpen, item } = this.props;
43
- // this is a hack for the requirements of this particular app
44
- if (!inline) {
45
- doModalOpen({
46
- children: [DatasetInfo],
47
- options: { item: item },
48
- openedBy: "LayerTree",
49
- });
50
- } else {
51
- this.setState({
52
- showLegend: !this.state.showLegend,
53
- });
54
- }
55
- }
56
-
57
- renderInfoButton() {
58
- const { item } = this.props;
59
- if (!item.info || _.isEmpty(item.info)) return null;
60
- return (
61
- <span
62
- onClick={this.openMetadata}
63
- title="More Information"
64
- style={{ paddingLeft: "4px", cursor: "pointer" }}
65
- >
66
- <i className="mdi mdi-alert-circle-outline"></i>
67
- </span>
68
- );
69
- }
70
-
71
- renderLegend() {
72
- // this is a hack for this app
73
- const { showLegend } = this.state;
74
- const { item } = this.props;
75
- if (!showLegend) return null;
76
- return <DatasetLegend item={item} />;
77
- }
78
-
79
- render() {
80
- const { item, isOver, theme, mapZoom } = this.props;
81
- const { expanded } = this.state;
82
- const {
83
- displayName,
84
- type,
85
- identifyType,
86
- favorite,
87
- userDefaultLayer,
88
- hoverText,
89
- } = item;
90
-
91
- const hoverTextDisplay = hoverText ? hoverText : displayName;
92
-
93
- if (!item.passFilter) return null;
94
-
95
- const enabled = item.minzoom <= mapZoom && item.maxzoom >= mapZoom;
96
- const itemTxtStyle = enabled ? { color: "#666" } : { color: "#bbb" };
97
-
98
- const itemClass = classnames({
99
- "cm-checkbox-inline": true,
100
- "cm-checkbox-ellipsis": true,
101
- "tree-list-item-hover": isOver,
102
- });
103
- const iconClass = classnames({
104
- mdi: true,
105
- "mdi-map-marker": type === "POINT",
106
- "mdi-vector-line": type === "LINE",
107
- "mdi-vector-polygon": type === "POLYGON",
108
- "mdi-grid": type === "RASTER",
109
- "mdi-google-maps": type === "SERVICE",
110
- });
111
- const expanderClass = classnames({
112
- [theme]: expanded,
113
- "layertree-layeritem-detailsicon": true,
114
- expanded: expanded,
115
- });
116
- return (
117
- <div className="layertree-layeritem">
118
- <span className="pull-right">
119
- <span onClick={this.toggleExpanded} className={expanderClass}>
120
- <i className="mdi mdi-dots-horizontal" title="More Info" />
121
- </span>
122
- </span>
123
- <label
124
- className={itemClass}
125
- title={`${hoverTextDisplay} ${!enabled ? "- zoom in to enable" : ""}`}
126
- style={itemTxtStyle}
127
- >
128
- <input
129
- disabled={!enabled}
130
- type="checkbox"
131
- checked={item.visible}
132
- value={item.visible}
133
- onChange={this.toggleVisible}
134
- />
135
- {identifyType ? (
136
- <sup
137
- style={{ fontSize: "10px" }}
138
- className="ms ms-information"
139
- title="Identify Tool Enabled for this Layer"
140
- ></sup>
141
- ) : null}
142
- {favorite ? (
143
- <i
144
- style={{ fontSize: "11px" }}
145
- className="mdi mdi-star"
146
- title="Layer saved to favorites list"
147
- />
148
- ) : null}
149
- {userDefaultLayer ? (
150
- <i
151
- style={{ fontSize: "11px" }}
152
- className="mdi mdi-account"
153
- title="Layer saved to user default layer list"
154
- />
155
- ) : null}
156
- {displayName}
157
- </label>
158
- {this.renderInfoButton()}
159
- {this.renderLegend()}
160
- </div>
161
- );
162
- }
163
- }
164
-
165
- export default connect(
166
- "selectTheme",
167
- "selectMapZoom",
168
- "doLayerSetVisible",
169
- "doTreeUpdate",
170
- "doZoomToLayerExtent",
171
- "doOpenLayerDetails",
172
- "doModalOpen",
173
- TreeListItemDataset
174
- );
1
+ import React from "react";
2
+ import { connect } from "redux-bundler-react";
3
+ import classnames from "classnames";
4
+ import DatasetInfo from "./dataset-info-modal";
5
+ import DatasetLegend from "./dataset-legend";
6
+ import _ from "lodash";
7
+
8
+ class TreeListItemDataset extends React.Component {
9
+ constructor(props) {
10
+ super(props);
11
+ this.state = {
12
+ showLegend: false,
13
+ visible: props.item.visible,
14
+ displayName: props.item.displayName,
15
+ hoverText: props.item.hoverText,
16
+ type: props.item.type,
17
+ expanded: false,
18
+ };
19
+
20
+ this.toggleVisible = this.toggleVisible.bind(this);
21
+ this.zoomTo = this.zoomTo.bind(this);
22
+ this.openMetadata = this.openMetadata.bind(this);
23
+ this.renderInfoButton = this.renderInfoButton.bind(this);
24
+ }
25
+
26
+ toggleVisible() {
27
+ const { item, doLayerSetVisible } = this.props;
28
+ doLayerSetVisible(item.uid, !item.visible);
29
+ }
30
+
31
+ toggleExpanded = () => {
32
+ const { doOpenLayerDetails, item } = this.props;
33
+ doOpenLayerDetails(item);
34
+ };
35
+
36
+ zoomTo() {
37
+ const { item, doZoomToLayerExtent } = this.props;
38
+ doZoomToLayerExtent(item.uid);
39
+ }
40
+
41
+ openMetadata(inline) {
42
+ const { doModalOpen, item } = this.props;
43
+ // this is a hack for the requirements of this particular app
44
+ if (!inline) {
45
+ doModalOpen({
46
+ children: [DatasetInfo],
47
+ options: { item: item },
48
+ openedBy: "LayerTree",
49
+ });
50
+ } else {
51
+ this.setState({
52
+ showLegend: !this.state.showLegend,
53
+ });
54
+ }
55
+ }
56
+
57
+ renderInfoButton() {
58
+ const { item } = this.props;
59
+ if (!item.info || _.isEmpty(item.info)) return null;
60
+ return (
61
+ <span
62
+ onClick={this.openMetadata}
63
+ title="More Information"
64
+ style={{ paddingLeft: "4px", cursor: "pointer" }}
65
+ >
66
+ <i className="mdi mdi-alert-circle-outline"></i>
67
+ </span>
68
+ );
69
+ }
70
+
71
+ renderLegend() {
72
+ // this is a hack for this app
73
+ const { showLegend } = this.state;
74
+ const { item } = this.props;
75
+ if (!showLegend) return null;
76
+ return <DatasetLegend item={item} />;
77
+ }
78
+
79
+ render() {
80
+ const { item, isOver, theme, mapZoom } = this.props;
81
+ const { expanded } = this.state;
82
+ const {
83
+ displayName,
84
+ type,
85
+ identifyType,
86
+ favorite,
87
+ userDefaultLayer,
88
+ hoverText,
89
+ } = item;
90
+
91
+ const hoverTextDisplay = hoverText ? hoverText : displayName;
92
+
93
+ if (!item.passFilter) return null;
94
+
95
+ const enabled = item.minzoom <= mapZoom && item.maxzoom >= mapZoom;
96
+ const itemTxtStyle = enabled ? { color: "#666" } : { color: "#bbb" };
97
+
98
+ const itemClass = classnames({
99
+ "cm-checkbox-inline": true,
100
+ "cm-checkbox-ellipsis": true,
101
+ "tree-list-item-hover": isOver,
102
+ });
103
+ const iconClass = classnames({
104
+ mdi: true,
105
+ "mdi-map-marker": type === "POINT",
106
+ "mdi-vector-line": type === "LINE",
107
+ "mdi-vector-polygon": type === "POLYGON",
108
+ "mdi-grid": type === "RASTER",
109
+ "mdi-google-maps": type === "SERVICE",
110
+ });
111
+ const expanderClass = classnames({
112
+ [theme]: expanded,
113
+ "layertree-layeritem-detailsicon": true,
114
+ expanded: expanded,
115
+ });
116
+ return (
117
+ <div className="layertree-layeritem">
118
+ <span className="pull-right">
119
+ <span onClick={this.toggleExpanded} className={expanderClass}>
120
+ <i className="mdi mdi-dots-horizontal" title="More Info" />
121
+ </span>
122
+ </span>
123
+ <label
124
+ className={itemClass}
125
+ title={`${hoverTextDisplay} ${!enabled ? "- zoom in to enable" : ""}`}
126
+ style={itemTxtStyle}
127
+ >
128
+ <input
129
+ disabled={!enabled}
130
+ type="checkbox"
131
+ checked={item.visible}
132
+ value={item.visible}
133
+ onChange={this.toggleVisible}
134
+ />
135
+ {identifyType ? (
136
+ <sup
137
+ style={{ fontSize: "10px" }}
138
+ className="ms ms-information"
139
+ title="Identify Tool Enabled for this Layer"
140
+ ></sup>
141
+ ) : null}
142
+ {favorite ? (
143
+ <i
144
+ style={{ fontSize: "11px" }}
145
+ className="mdi mdi-star"
146
+ title="Layer saved to favorites list"
147
+ />
148
+ ) : null}
149
+ {userDefaultLayer ? (
150
+ <i
151
+ style={{ fontSize: "11px" }}
152
+ className="mdi mdi-account"
153
+ title="Layer saved to user default layer list"
154
+ />
155
+ ) : null}
156
+ {displayName}
157
+ </label>
158
+ {this.renderInfoButton()}
159
+ {this.renderLegend()}
160
+ </div>
161
+ );
162
+ }
163
+ }
164
+
165
+ export default connect(
166
+ "selectTheme",
167
+ "selectMapZoom",
168
+ "doLayerSetVisible",
169
+ "doTreeUpdate",
170
+ "doZoomToLayerExtent",
171
+ "doOpenLayerDetails",
172
+ "doModalOpen",
173
+ TreeListItemDataset
174
+ );