This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(): add position action to tooltip
- Loading branch information
1 parent
1a9ce5e
commit 72fb69f
Showing
6 changed files
with
122 additions
and
76 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import React from "react"; | ||
//import ReactDOM from 'react-dom' | ||
//import PropTypes from "prop-types"; | ||
import { connect } from "react-redux"; | ||
import { getPosition } from '../../domain/controls'; | ||
|
||
/*import { select, event as d3Event } from "d3-selection"; | ||
import * as d3 from 'd3'; | ||
import { | ||
compose, | ||
differenceWith, | ||
eqBy, | ||
equals, | ||
find, | ||
findIndex, | ||
identity, | ||
insert, | ||
isEmpty, | ||
isNil, | ||
path, | ||
remove | ||
} from "ramda"; */ | ||
|
||
class TooltipControls extends React.Component { | ||
constructor(props){ | ||
super(props) | ||
this.state = { | ||
position: [0,0], | ||
} | ||
console.log(props) | ||
} | ||
|
||
|
||
render() { | ||
const style = { | ||
display : 'block"', | ||
position: "fixed", | ||
top: `${this.props.position[0]}px`, | ||
left: `${this.props.position[1]}px` | ||
//transform:`transform3d(${this.props.x},${this.props.y},0)` | ||
|
||
} | ||
|
||
return ( | ||
<div style={style}> | ||
<div>Data</div> | ||
<div>Notes</div> | ||
</div> | ||
); | ||
} | ||
} | ||
const mapStateToProps = (state, ownProps) => { | ||
return { | ||
position: getPosition(state) | ||
}; | ||
}; | ||
|
||
export default connect(mapStateToProps)(TooltipControls); | ||
|
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 was deleted.
Oops, something went wrong.
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