Skip to content

Commit

Permalink
Atrribute maptip shouldn't be visible if FeatureInfo only includes a …
Browse files Browse the repository at this point in the history
…maptip
  • Loading branch information
stephaschu committed Sep 7, 2017
1 parent ad9f50e commit 4eae4a9
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions QWC2Components/components/IdentifyViewer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,20 @@ const IdentifyViewer = React.createClass({
if(this.props.theme.skipEmptyFeatureAttributes && (!feature.properties[attrib] || feature.properties[attrib] === "NULL")) {
return null;
}
return (
<tr key={attrib}>
<td className="identify-attr-title"><i>{attrib}</i></td>
<td className="identify-attr-value" dangerouslySetInnerHTML={{__html: this.addLinkAnchors(feature.properties[attrib])}}></td>
</tr>
);
if(properties.length === 1 && feature.properties["maptip"]) {
return (
<tr key={attrib}>
<td className="identify-attr-value" dangerouslySetInnerHTML={{__html: this.addLinkAnchors(feature.properties[attrib])}}></td>
</tr>
);
} else {
return (
<tr key={attrib}>
<td className="identify-attr-title"><i>{attrib}</i></td>
<td className="identify-attr-value" dangerouslySetInnerHTML={{__html: this.addLinkAnchors(feature.properties[attrib])}}></td>
</tr>
);
}
})}
</tbody></table>
</div>
Expand Down

0 comments on commit 4eae4a9

Please sign in to comment.