forked from geosolutions-it/MapStore2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove useless code from existing codebase (geosolutions-it#1104)
- Removed useless properties and code - Add the option to display icon for zoom to feature
- Loading branch information
1 parent
a56dc1a
commit 41abef4
Showing
3 changed files
with
31 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
web/client/components/data/featuregrid/ZoomToFeatureIcon.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* Copyright 2017, GeoSolutions Sas. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
const React = require('react'); | ||
const {Glyphicon} = require('react-bootstrap'); | ||
|
||
const ZoomToFeatureIcon = React.createClass({ | ||
propTypes: { | ||
params: React.PropTypes.object | ||
}, | ||
render() { | ||
const geometry = this.props.params && this.props.params.data && this.props.params.data.geometry; | ||
return geometry && geometry.coordinates ? ( | ||
<Glyphicon glyph="search" width={16}/> | ||
) : null; | ||
} | ||
}); | ||
|
||
module.exports = ZoomToFeatureIcon; |