update prop name to detectPosition

This commit is contained in:
Aakansha Doshi
2021-04-11 13:49:40 +05:30
parent 4fb906baad
commit ac08f433e9
3 changed files with 9 additions and 9 deletions
+5 -5
View File
@@ -306,7 +306,7 @@ class App extends React.Component<AppProps, AppState> {
private scene: Scene;
private resizeObserver: ResizeObserver | undefined;
private nearestScrollableContainer: HTMLElement | Document | undefined;
private detectPositionChangeIntervalId: NodeJS.Timeout | undefined;
private detectPositionIntervalId: NodeJS.Timeout | undefined;
constructor(props: AppProps) {
super(props);
@@ -791,8 +791,8 @@ class App extends React.Component<AppProps, AppState> {
this.scene.addCallback(this.onSceneUpdated);
this.addEventListeners();
if (this.props.detectPositionChange) {
this.detectPositionChangeIntervalId = setInterval(
if (this.props.detectPosition) {
this.detectPositionIntervalId = setInterval(
this.updateOffsetsIfChanged,
DETECT_POSITION_CHANGE_INTERVAL,
);
@@ -839,8 +839,8 @@ class App extends React.Component<AppProps, AppState> {
this.removeEventListeners();
this.scene.destroy();
clearTimeout(touchTimeout);
if (this.detectPositionChangeIntervalId) {
clearInterval(this.detectPositionChangeIntervalId);
if (this.detectPositionIntervalId) {
clearInterval(this.detectPositionIntervalId);
}
touchTimeout = 0;
}