Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Commit

Permalink
Merge pull request #362 from Bayer-Group/multi-map-controls
Browse files Browse the repository at this point in the history
move SplitScreen & SyncableMap into ol-kit
  • Loading branch information
stazrad authored Dec 23, 2021
2 parents 7e967d3 + c6445ba commit 7e6b209
Show file tree
Hide file tree
Showing 223 changed files with 2,641 additions and 602 deletions.
63 changes: 34 additions & 29 deletions app/demos/multi/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,46 @@ import React from 'react'
import {
Map,
Popup,
TabbedPanel,
Controls,
ContextMenu,
loadDataLayer,
LayerStyler,
LayerPanelLayersPage,
MultiMapManager,
TabbedPanelPage,
BasemapContainer,
VectorLayer,
DrawContainer,
LayerPanel,
FullScreenFlex,
FlexMap,
FullScreenFlex
SplitScreen,
} from '@bayer/ol-kit'
import { fromLonLat } from 'ol/proj'
import olFeature from 'ol/Feature'
import olGeomPoint from 'ol/geom/Point'
import olSourceVector from 'ol/source/Vector'

import Welcome from '../../Welcome'

class App extends React.Component {
mapConfigs = [
{
id: 'map0',
synced: true,
visible: true
},
{
id: 'map1',
synced: false,
visible: false
},
{
id: 'map2',
synced: false,
visible: false
},
{
id: 'map3',
synced: false,
visible: false
},
]

onMapInit = async (map) => {
// create a vector layer and add to the map
const layer = new VectorLayer({
Expand All @@ -43,34 +61,21 @@ class App extends React.Component {
const dataLayer = await loadDataLayer(map, 'https://data.nasa.gov/api/geospatial/7zbq-j77a?method=export&format=KML')

dataLayer.getSource().getFeatures().forEach(f => f.set('title', f.get('name')))

window.map = map
}

render () {
const mapKeys = [
'map0',
'map1',
'map2',
'map3',
'map4',
'map5',
'map6',
'map7',
]

return (
<MultiMapManager groups={[['map0', 'map1'],['map2', 'map3']]}>
<MultiMapManager>
<div style={{position: 'absolute', top: 20, left: 20, zIndex: 1, }}>
<SplitScreen />
</div>
<FullScreenFlex>
{mapKeys.map((key, i, array) => {
{this.mapConfigs.map(({ id, synced, visible }, i) => {
return (
<FlexMap
key={key}
index={i}
total={array.length}
numberOfRows={2}
numberOfColumns={4}>
<Map id={key} onMapInit={this.onMapInit} isMultiMap>
key={id}
index={i}>
<Map id={id} onMapInit={this.onMapInit} synced={synced} visible={visible} isMultiMap>
<Popup />
<ContextMenu />
<Controls />
Expand Down
2 changes: 1 addition & 1 deletion docs/BasemapBingMaps.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/BasemapBlankWhite.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/BasemapContainer.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/BasemapManager.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/BasemapOpenStreetMap.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/BasemapStamenTerrain.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/BasemapStamenTonerDark.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/BasemapStamenTonerLite.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Basemaps_BasemapContainer.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Basemaps_BasemapManager.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Basemaps_BingMaps.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Basemaps_BlankWhite.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Basemaps_OpenStreetMap.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Basemaps_StamenTerrain.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Basemaps_StamenTonerDark.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Basemaps_StamenTonerLite.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Basemaps_utils.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Compass.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/ContextMenu.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/ContextMenuCoords.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/ContextMenuListItem.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/ContextMenu_ContextMenu.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/ContextMenu_ContextMenuCoords.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/ContextMenu_ContextMenuListItem.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/ControlGroup.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/ControlGroupButton.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Controls.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Controls_Compass.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Controls_ControlGroup.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Controls_ControlGroupButton.js.html

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions docs/Controls_Controls.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Controls_CurrentLocation.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Controls_ScaleLine.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Controls_ZoomControls.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Controls_ZoomIn.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Controls_ZoomOut.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/CurrentLocation.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/DataLayers_utils.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Draw.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/DrawBox.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/DrawCircle.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/DrawContainer.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/DrawFreehand.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/DrawLine.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/DrawPin.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/DrawPoint.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/DrawPolygon.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Draw_Box.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Draw_Circle.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Draw_Draw.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Draw_DrawContainer.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Draw_Freehand.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Draw_Line.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Draw_Pin.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Draw_Point.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Draw_Polygon.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Draw_utils.js.html

Large diffs are not rendered by default.

293 changes: 293 additions & 0 deletions docs/ErrorBoundary.html

Large diffs are not rendered by default.

191 changes: 191 additions & 0 deletions docs/ErrorBoundary_ErrorBoundary.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/FeatureEditor.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/FeatureEditor_FeatureEditor.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/FeatureEditor_styles.js.html

Large diffs are not rendered by default.

56 changes: 54 additions & 2 deletions docs/GoogleDirections.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/GoogleDirections_GoogleDirections.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/GooglePlacesSearch.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/GooglePlacesSearch_GooglePlacesSearch.js.html

Large diffs are not rendered by default.

45 changes: 43 additions & 2 deletions docs/HeatmapControls.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Heatmap_HeatmapControls.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/ImageExif_ImageExif.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanel.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanelActionDuplicate.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanelActionExport.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanelActionExtent.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanelActionHeatmap.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanelActionImport.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanelActionMerge.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanelActionMergeFeatures.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanelActionOpacity.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanelActionRemove.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanelActions.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanelBase.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanelCheckbox.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanelContent.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanelHeader.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanelLayersPage.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanelList.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanelListItem.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanelMenu.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanelPage.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanel_LayerPanel.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanel_LayerPanelActionDuplicate_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanel_LayerPanelActionExport_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanel_LayerPanelActionExport_utils.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanel_LayerPanelActionExtent_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanel_LayerPanelActionHeatmap_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanel_LayerPanelActionHeatmap_utils.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanel_LayerPanelActionImport_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanel_LayerPanelActionImport_utils.js.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanel_LayerPanelActionMerge_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanel_LayerPanelActionMerge_utils.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanel_LayerPanelActionOpacity_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanel_LayerPanelActionRemove_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanel_LayerPanelActions_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanel_LayerPanelBase_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanel_LayerPanelCheckbox_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanel_LayerPanelContent_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanel_LayerPanelHeader_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanel_LayerPanelLayersPage_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanel_LayerPanelListItem_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanel_LayerPanelList_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanel_LayerPanelMenu_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerPanel_LayerPanelPage_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerStyler.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerStyler_LayerStyler.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerStyler_StyleManager_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerStyler__AttributesFilter_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerStyler__ColorPicker_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerStyler__LabelStyler_index.js.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerStyler__LayerStyler__StyleGroup_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerStyler__LayerStyler_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerStyler__Popover_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LayerStyler__SelectTabs_index.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/LayerStyler__Selector_index.js.html

Large diffs are not rendered by default.

34 changes: 28 additions & 6 deletions docs/Map.html

Large diffs are not rendered by default.

348 changes: 348 additions & 0 deletions docs/MapDisplayElement.html

Large diffs are not rendered by default.

29 changes: 20 additions & 9 deletions docs/Map_Map.js.html

Large diffs are not rendered by default.

11 changes: 7 additions & 4 deletions docs/Map_utils.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Measure_utils.js.html

Large diffs are not rendered by default.

91 changes: 88 additions & 3 deletions docs/MultiMapManager.html

Large diffs are not rendered by default.

204 changes: 144 additions & 60 deletions docs/MultiMapManager_MultiMapManager.js.html

Large diffs are not rendered by default.

24 changes: 13 additions & 11 deletions docs/MultiMapManager_SafeParent.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/MultiMapManager_utils.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Pdf_utils.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Popup.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/PopupActionCopyWkt.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/PopupActionGoogleMaps.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/PopupActionGroup.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/PopupActionItem.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/PopupActionLink.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/PopupBase.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/PopupDataList.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/PopupDefaultInsert.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/PopupDefaultPage.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/PopupPageLayout.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/PopupPageLayoutChild.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/PopupTabs.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Popup_Popup.js.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Popup_PopupActions_PopupActionCopyWkt_utils.js.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Popup_PopupBase.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Popup_PopupInsert_PopupActionGroup_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Popup_PopupInsert_PopupActionItem_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Popup_PopupInsert_PopupActionLink_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Popup_PopupInsert_PopupDataList_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Popup_PopupInsert_PopupDefaultInsert.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Popup_PopupInsert_PopupDefaultPage_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Popup_PopupInsert_PopupPageLayoutChild_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Popup_PopupInsert_PopupPageLayout_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Popup_PopupInsert_PopupTabs_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Popup_PopupInsert__LoadingSpinner_index.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Popup_utils.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/ProjectMenu.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Project_Project.js.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/Project_utils.js.html

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions docs/Provider.html

Large diffs are not rendered by default.

11 changes: 7 additions & 4 deletions docs/Provider_Provider.js.html

Large diffs are not rendered by default.

105 changes: 56 additions & 49 deletions docs/Provider_utils.js.html

Large diffs are not rendered by default.

169 changes: 169 additions & 0 deletions docs/SplitScreen_MapDisplayElement_index.js.html

Large diffs are not rendered by default.

148 changes: 148 additions & 0 deletions docs/SplitScreen_Slider_index.js.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>ol-kit | SplitScreen/Slider/index.js</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densityDpi=device-dpi" />


<!-- these scripts must be at the top to properly syntax highlight code examples -->
<script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.26.0/babel.min.js" integrity="sha256-FiZMk1zgTeujzf/+vomWZGZ9r00+xnGvOgXoj0Jo1jA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
<link type="text/css" rel="stylesheet" href="https://jmblog.github.io/color-themes-for-google-code-prettify/themes/tomorrow.min.css">
<link type="text/css" rel="stylesheet" href="styles/app.css">
<link type="text/css" rel="stylesheet" href="styles/iframe.css">
</head>

<body>
<div id="stickyNavbarOverlay"></div>
<div class="top-navbar">
<div class="container">
<nav class="navbar" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a href="index.html"><img src="static/ol-kit-logo.png" alt="logo"></a>
<a id="hamburger" role="button" class="navbar-burger" aria-label="menu" aria-expanded="false">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>

<div class="navbar-menu">
<div class="navbar-end">

<div class="navbar-item">
<a href="tutorial-Getting%20Started.html">
Get Started
</a>
</div>

<div class="navbar-item">
<a href="docs.html">
Docs
</a>
</div>

<div class="navbar-item">
<a href="https://github.com/Bayer-Group/ol-kit">
Github
</a>
</div>

</div>
</div>

</nav>
</div>
</div>
<div id="page-wrapper" class="container">
<div class="columns">
<div class="column is-3" id="sidebar-nav">
<div class="sidebar sidebar__inner">
<nav>
<div class="category"><h3>Tutorials</h3><ul><li><a class="undefined"href="tutorial-Getting Started.html">Getting Started</a></li><li><a class="undefined"href="tutorial-LayerPanel_.html">LayerPanel</a></li><li><a class="undefined"href="tutorial-Popup_.html">Popup</a></li><li><a class="undefined"href="tutorial-TimeSlider_.html">TimeSlider</a></li><li><a class="undefined"href="tutorial-connectToContext.html">connectToContext</a></li><li><a class="undefined"href="tutorial-contextProps.html">contextProps</a></li><li><a class="undefined"href="tutorial-i18n Support.html">i18n Support</a></li></ul><h3>Components</h3><ul><li><a href="ErrorBoundary.html">ErrorBoundary</a></li></ul><h3>Utils</h3><ul><li><a href="global.html#immediateEditStyle">immediateEditStyle</a></li><li><a href="global.html#styleText">styleText</a></li></ul></div><div class="category"><h2>Basemap</h2><h3>Components</h3><ul><li><a href="BasemapBingMaps.html">BasemapBingMaps</a></li><li><a href="BasemapBlankWhite.html">BasemapBlankWhite</a></li><li><a href="BasemapContainer.html">BasemapContainer</a></li><li><a href="BasemapManager.html">BasemapManager</a></li><li><a href="BasemapOpenStreetMap.html">BasemapOpenStreetMap</a></li><li><a href="BasemapStamenTerrain.html">BasemapStamenTerrain</a></li><li><a href="BasemapStamenTonerDark.html">BasemapStamenTonerDark</a></li><li><a href="BasemapStamenTonerLite.html">BasemapStamenTonerLite</a></li></ul><h3>Utils</h3><ul><li><a href="global.html#loadBasemapLayer">loadBasemapLayer</a></li></ul></div><div class="category"><h2>Classes</h2><h3>Utils</h3><ul><li><a href="global.html#VectorLayer">VectorLayer</a></li><li><a href="global.html#VectorTileLayer">VectorTileLayer</a></li></ul></div><div class="category"><h2>ContextMenu</h2><h3>Components</h3><ul><li><a href="ContextMenu.html">ContextMenu</a></li><li><a href="ContextMenuCoords.html">ContextMenuCoords</a></li><li><a href="ContextMenuListItem.html">ContextMenuListItem</a></li></ul></div><div class="category"><h2>Controls</h2><h3>Components</h3><ul><li><a href="Compass.html">Compass</a></li><li><a href="ControlGroup.html">ControlGroup</a></li><li><a href="ControlGroupButton.html">ControlGroupButton</a></li><li><a href="Controls.html">Controls</a></li><li><a href="CurrentLocation.html">CurrentLocation</a></li><li><a href="ZoomControls.html">ZoomControls</a></li><li><a href="ZoomIn.html">ZoomIn</a></li><li><a href="ZoomOut.html">ZoomOut</a></li></ul></div><div class="category"><h2>DataLayers</h2><h3>Utils</h3><ul><li><a href="global.html#loadDataLayer">loadDataLayer</a></li></ul></div><div class="category"><h2>Draw</h2><h3>Components</h3><ul><li><a href="Draw.html">Draw</a></li><li><a href="DrawBox.html">DrawBox</a></li><li><a href="DrawCircle.html">DrawCircle</a></li><li><a href="DrawContainer.html">DrawContainer</a></li><li><a href="DrawFreehand.html">DrawFreehand</a></li><li><a href="DrawLine.html">DrawLine</a></li><li><a href="DrawPin.html">DrawPin</a></li><li><a href="DrawPoint.html">DrawPoint</a></li><li><a href="DrawPolygon.html">DrawPolygon</a></li></ul><h3>Utils</h3><ul><li><a href="global.html#getStyledFeatures">getStyledFeatures</a></li><li><a href="global.html#styleText">styleText</a></li></ul></div><div class="category"><h2>FeatureEditor</h2><h3>Components</h3><ul><li><a href="FeatureEditor.html">FeatureEditor</a></li></ul></div><div class="category"><h2>GoogleDirections</h2><h3>Components</h3><ul><li><a href="GoogleDirections.html">GoogleDirections</a></li></ul></div><div class="category"><h2>GooglePlacesSearch</h2><h3>Components</h3><ul><li><a href="GooglePlacesSearch.html">GooglePlacesSearch</a></li></ul></div><div class="category"><h2>Heatmap</h2><h3>Components</h3><ul><li><a href="HeatmapControls.html">HeatmapControls</a></li></ul></div><div class="category"><h2>LayerPanel</h2><h3>Components</h3><ul><li><a href="LayerPanel.html">LayerPanel</a></li><li><a href="LayerPanelActionDuplicate.html">LayerPanelActionDuplicate</a></li><li><a href="LayerPanelActionExport.html">LayerPanelActionExport</a></li><li><a href="LayerPanelActionExtent.html">LayerPanelActionExtent</a></li><li><a href="LayerPanelActionHeatmap.html">LayerPanelActionHeatmap</a></li><li><a href="LayerPanelActionImport.html">LayerPanelActionImport</a></li><li><a href="LayerPanelActionMerge.html">LayerPanelActionMerge</a></li><li><a href="LayerPanelActionMergeFeatures.html">LayerPanelActionMergeFeatures</a></li><li><a href="LayerPanelActionOpacity.html">LayerPanelActionOpacity</a></li><li><a href="LayerPanelActionRemove.html">LayerPanelActionRemove</a></li><li><a href="LayerPanelActions.html">LayerPanelActions</a></li><li><a href="LayerPanelBase.html">LayerPanelBase</a></li><li><a href="LayerPanelCheckbox.html">LayerPanelCheckbox</a></li><li><a href="LayerPanelContent.html">LayerPanelContent</a></li><li><a href="LayerPanelHeader.html">LayerPanelHeader</a></li><li><a href="LayerPanelLayersPage.html">LayerPanelLayersPage</a></li><li><a href="LayerPanelList.html">LayerPanelList</a></li><li><a href="LayerPanelListItem.html">LayerPanelListItem</a></li><li><a href="LayerPanelMenu.html">LayerPanelMenu</a></li><li><a href="LayerPanelPage.html">LayerPanelPage</a></li></ul><h3>Utils</h3><ul><li><a href="global.html#addHeatmapLayer">addHeatmapLayer</a></li><li><a href="global.html#addVectorLayer">addVectorLayer</a></li><li><a href="global.html#convertFileToFeatures">convertFileToFeatures</a></li><li><a href="global.html#convertFileToLayer">convertFileToLayer</a></li><li><a href="global.html#exportFeatures">exportFeatures</a></li><li><a href="global.html#mergeLayerFeatures">mergeLayerFeatures</a></li></ul></div><div class="category"><h2>LayerStyler</h2><h3>Components</h3><ul><li><a href="LayerStyler.html">LayerStyler</a></li></ul></div><div class="category"><h2>Map</h2><h3>Components</h3><ul><li><a href="Map.html">Map</a></li></ul><h3>Utils</h3><ul><li><a href="global.html#addSelectInteraction">addSelectInteraction</a></li><li><a href="global.html#centerAndZoom">centerAndZoom</a></li><li><a href="global.html#convertXYtoLatLong">convertXYtoLatLong</a></li><li><a href="global.html#createMap">createMap</a></li><li><a href="global.html#createSelectInteraction">createSelectInteraction</a></li><li><a href="global.html#getExtentForFeatures">getExtentForFeatures</a></li><li><a href="global.html#getSelectInteraction">getSelectInteraction</a></li><li><a href="global.html#setMapExtent">setMapExtent</a></li><li><a href="global.html#updateMapFromUrl">updateMapFromUrl</a></li><li><a href="global.html#updateUrlFromMap">updateUrlFromMap</a></li></ul></div><div class="category"><h2>MultiMap</h2><h3>Components</h3><ul><li><a href="MultiMapManager.html">MultiMapManager</a></li></ul><h3>Utils</h3><ul><li><a href="global.html#syncViewEvents">syncViewEvents</a></li></ul></div><div class="category"><h2>PDF</h2><h3>Utils</h3><ul><li><a href="global.html#convertSvgToPDFTemplate">convertSvgToPDFTemplate</a></li><li><a href="global.html#printPDFTemplate">printPDFTemplate</a></li></ul></div><div class="category"><h2>Popup</h2><h3>Components</h3><ul><li><a href="Popup.html">Popup</a></li><li><a href="PopupActionGroup.html">PopupActionGroup</a></li><li><a href="PopupActionItem.html">PopupActionItem</a></li><li><a href="PopupActionLink.html">PopupActionLink</a></li><li><a href="PopupBase.html">PopupBase</a></li><li><a href="PopupDataList.html">PopupDataList</a></li><li><a href="PopupDefaultInsert.html">PopupDefaultInsert</a></li><li><a href="PopupDefaultPage.html">PopupDefaultPage</a></li><li><a href="PopupPageLayout.html">PopupPageLayout</a></li><li><a href="PopupPageLayoutChild.html">PopupPageLayoutChild</a></li><li><a href="PopupTabs.html">PopupTabs</a></li></ul><h3>Utils</h3><ul><li><a href="global.html#addMovementListener">addMovementListener</a></li><li><a href="global.html#calculateViewPadding">calculateViewPadding</a></li><li><a href="global.html#getLayersAndFeaturesForEvent">getLayersAndFeaturesForEvent</a></li><li><a href="global.html#getPixelValue">getPixelValue</a></li><li><a href="global.html#getPopupPositionFromFeatures">getPopupPositionFromFeatures</a></li><li><a href="global.html#removeMovementListener">removeMovementListener</a></li><li><a href="global.html#sanitizeProperties">sanitizeProperties</a></li></ul></div><div class="category"><h2>PopupActionCopyWkt</h2><h3>Components</h3><ul><li><a href="PopupActionCopyWkt.html">PopupActionCopyWkt</a></li></ul><h3>Utils</h3><ul><li><a href="global.html#convertFeatureToWkt">convertFeatureToWkt</a></li><li><a href="global.html#copyTextToClipboard">copyTextToClipboard</a></li><li><a href="global.html#copyWktToClipbard">copyWktToClipbard</a></li></ul></div><div class="category"><h2>PopupActionGoogleMaps</h2><h3>Components</h3><ul><li><a href="PopupActionGoogleMaps.html">PopupActionGoogleMaps</a></li></ul></div><div class="category"><h2>Project</h2><h3>Components</h3><ul><li><a href="ProjectMenu.html">ProjectMenu</a></li></ul><h3>Utils</h3><ul><li><a href="global.html#createProject">createProject</a></li><li><a href="global.html#loadProject">loadProject</a></li></ul></div><div class="category"><h2>Provider</h2><h3>Components</h3><ul><li><a href="Provider.html">Provider</a></li></ul><h3>Utils</h3><ul><li><a href="global.html#connectToContext">connectToContext</a></li></ul></div><div class="category"><h2>SplitScreen</h2><h3>Components</h3><ul><li><a href="MapDisplayElement.html">MapDisplayElement</a></li></ul></div><div class="category"><h2>TabbedPanel</h2><h3>Components</h3><ul><li><a href="TabbedPanel.html">TabbedPanel</a></li></ul></div><div class="category"><h2>TimeSlider</h2><h3>Components</h3><ul><li><a href="TimeSlider.html">TimeSlider</a></li><li><a href="TimeSliderBase.html">TimeSliderBase</a></li></ul></div>
</nav>
</div>
</div>
<div class="column is-9-desktop" id="main-content-wrapper">
<div class="content">





<section>
<article>
<pre class="prettyprint source linenums"><code>import React from 'react'
import ReactDOM from 'react-dom'
import PropTypes from 'prop-types'
import Draggable from 'react-draggable'
import { DragBar } from './styled'
import DragBarIcon from './svgIcons/DragBarIcon'

const Slider = ({ initialPosition, onDrag, innerRef }) => {
const limit = window.innerWidth * 0.2
const leftBound = (window.innerWidth - limit - (window.innerWidth - initialPosition)) * -1
const rightBound = window.innerWidth - initialPosition - limit

return (
ReactDOM.createPortal(
&lt;Draggable axis={'x'} bounds={{ left: leftBound, right: rightBound }} onDrag={onDrag}>
&lt;DragBar position={initialPosition} yOffset={55} ref={innerRef}>
&lt;DragBarIcon color={'lightgray'} />
&lt;/DragBar>
&lt;/Draggable>,
document.body
)
)
}

Slider.propTypes = {
/** render slider in a specific position */
initialPosition: PropTypes.number,

/** Callback that get's fired when the slider is dragged */
onDrag: PropTypes.func,

/** A reference to the inner DOM node */
innerRef: PropTypes.func
}

export default Slider
</code></pre>
</article>
</section>




</div>
</div>
</div>
</div>
<footer class="footer">
<div class="content has-text-centered">
<div style="margin: 0 auto; text-align: center; background: white; margin: 30px 0;">
<a href="https://www.cropscience.bayer.com" target="_blank">
<img src="static/bayer-logo.png" width="200px" />
</a>
<div>&copy; 2020 Bayer Crop Science; All Rights Reserved. <br />
<a style="color: #a2a2a2" target="_blank" href="https://bayer.talentnet.community/jobs/881c8317-33b7-435f-9410-359b1b925322"> Geospatial Developer Career Opportunities </a>
</div>
</div>
</div>
</footer>

<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.2.0/zepto.min.js" integrity="sha256-vrn14y7WH7zgEElyQqm2uCGSQrX/xjYDjniRUQx3NyU=" crossorigin="anonymous"></script>
<script src="https://unpkg.com/sticky-sidebar/dist/sticky-sidebar.min.js"></script>
<script src="scripts/app.js"></script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>
Loading

0 comments on commit 7e6b209

Please sign in to comment.