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.
- Loading branch information
1 parent
706eb21
commit 1e856ff
Showing
4 changed files
with
110 additions
and
31 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
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
24 changes: 24 additions & 0 deletions
24
web/client/plugins/widgetbuilder/enhancers/connection/legendBuilderConnect.js
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,24 @@ | ||
/* | ||
* Copyright 2018, 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 { withProps, compose } = require('recompose'); | ||
|
||
const withMapConnect = require('./withMapConnect'); | ||
/** | ||
* Enhancer for MapBuilder to allow connection configuration. | ||
* | ||
*/ | ||
module.exports = compose( | ||
withProps(({ availableDependencies = [], editorData = {}} = {}) => ({ | ||
availableDependencies: availableDependencies.filter(d => !(editorData.id && d.indexOf(editorData.id) >= 0)) | ||
})), | ||
withProps(({ editorData = {}, availableDependencies = []}) => ({ | ||
canConnect: availableDependencies.length > 0, | ||
connected: !!editorData.mapSync | ||
})), | ||
withMapConnect({center: "center", "zoom": "zoom"}) | ||
); |