Skip to content

Commit a90c76a

Browse files
authored
Merge pull request #162 from wwayne/fix
Fix for #158, getposition error
2 parents 9fe3f0b + 3b95275 commit a90c76a

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/index.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class ReactTooltip extends Component {
4545
constructor (props) {
4646
super(props)
4747
this.state = {
48-
place: '', // Direction of tooltip
48+
place: 'top', // Direction of tooltip
4949
type: 'dark', // Color theme of tooltip
5050
effect: 'float', // float or fixed
5151
show: false,
@@ -275,10 +275,8 @@ class ReactTooltip extends Component {
275275
if (!this.mount) return
276276

277277
const resetState = (resetPlace) => {
278-
const newPlace = resetPlace ? '' : this.state.place
279278
this.setState({
280-
show: false,
281-
place: newPlace
279+
show: false
282280
})
283281
this.removeScrollListener()
284282
}

src/index.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
padding: 8px 21px;
6464
position: fixed;
6565
pointer-events: none;
66-
transition: opacity 0.3s ease-out , margin-top 0.3s ease-out, margin-left 0.3s ease-out;
66+
transition: opacity 0.3s ease-out;
6767
top: -999em;
6868
visibility: hidden;
6969
z-index: 999;

src/style.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)