-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feat] Sync filter with layer timeline
Signed-off-by: Ihor Dykhta <dikhta.igor@gmail.com>
- Loading branch information
1 parent
0b6f320
commit 1d7bfc7
Showing
24 changed files
with
533 additions
and
147 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// SPDX-License-Identifier: MIT | ||
// Copyright contributors to the kepler.gl project | ||
|
||
import React, {Component} from 'react'; | ||
import PropTypes, {any} from 'prop-types'; | ||
import Base from './base'; | ||
|
||
export default class TimelineMarker extends Component { | ||
static propTypes = { | ||
/** Set the height of the icon, ex. '16px' */ | ||
height: PropTypes.string, | ||
// not expected? | ||
width: PropTypes.string, | ||
style: any | ||
}; | ||
|
||
static defaultProps = { | ||
height: '16px', | ||
predefinedClassName: 'data-ex-icons-timeline-marker', | ||
viewBox: '0 0 5 12' | ||
}; | ||
|
||
render() { | ||
return ( | ||
<Base {...this.props}> | ||
<svg | ||
width="5" | ||
height="12" | ||
viewBox="0 0 5 12" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<rect width="5" height="9" fill="#C4C4C4" /> | ||
<path d="M2.5 11.5L0 9H5L2.5 11.5Z" fill="#C4C4C4" /> | ||
</svg> | ||
</Base> | ||
); | ||
} | ||
} |
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,37 @@ | ||
// SPDX-License-Identifier: MIT | ||
// Copyright contributors to the kepler.gl project | ||
|
||
import React from 'react'; | ||
import {TimelineMarker} from '../common/icons'; | ||
|
||
const LINE_STYLE = { | ||
height: '4px', | ||
width: '100%', | ||
backgroundColor: '#5558DB' | ||
}; | ||
|
||
const TIMELINE_MARKER_LEFT_STYLE = {position: 'absolute', top: '0', left: '-2px'}; | ||
const TIMELINE_MARKER_RIGHT_STYLE = {position: 'absolute', top: '0', right: '-2px'}; | ||
|
||
function RangeSliderSublineFactory() { | ||
const RangeSliderSubline = ({line}) => { | ||
return ( | ||
<div | ||
style={{ | ||
marginLeft: `${line[0]}%`, | ||
paddingTop: '14px', | ||
width: `${line[1] - line[0]}%`, | ||
position: 'relative' | ||
}} | ||
> | ||
<TimelineMarker height="12px" width="5px" style={TIMELINE_MARKER_LEFT_STYLE} /> | ||
<div style={LINE_STYLE} /> | ||
<TimelineMarker height="12px" width="5px" style={TIMELINE_MARKER_RIGHT_STYLE} /> | ||
</div> | ||
); | ||
}; | ||
|
||
return RangeSliderSubline; | ||
} | ||
|
||
export default RangeSliderSublineFactory; |
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
Oops, something went wrong.