Skip to content

Commit 3798666

Browse files
committed
update dom use location
1 parent 5ca493f commit 3798666

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

examples/scrollScreen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class Demo extends React.Component {
9393
<div id="page1" style={{ overflow: 'hidden', background: '#133252' }}>
9494
<ScrollOverPack
9595
className="page1"
96-
playScale={0.5}
96+
playScale={1}
9797
replay
9898
hideProps={{ 0: { reverse: true } }}
9999
location="page1"

src/ScrollElement.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ class ScrollElement extends React.Component {
1010
componentDidMount() {
1111
this.dom = ReactDOM.findDOMNode(this);
1212
if (this.props.location) {
13-
mapped.register(this.props.location, document.getElementById(this.props.location));
13+
this.dom = document.getElementById(this.props.location);
14+
mapped.register(this.props.location, this.dom);
1415
} else if (this.props.id) {
1516
mapped.register(this.props.id, this.dom);
1617
}

0 commit comments

Comments
 (0)