Skip to content

Commit dc02f6a

Browse files
committed
fix: useEffect
1 parent 4968919 commit dc02f6a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/components/FloorPanel/FloorPanel.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ export const FloorPanel: React.FC<Props> = props => {
5252
handleSpaceId()
5353
}, [ids, values])
5454

55+
handleInputSourceData()
56+
handleSpaceId()
57+
5558
return <FloorPlan id={id} token={token} onLoad={handleEvents} />
5659
}
5760

src/components/FloorPlan/FloorPlan.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ const FloorPanel: React.FC<FloorOptions> = props => {
2323
options: props.startupOptions
2424
})
2525
fpe.loadScene(props.id, tokenOptions).then(() => {
26-
if (props.onLoad) props.onLoad(fpe)
26+
if (props.onLoad) {
27+
props.onLoad(fpe)
28+
}
2729
})
2830
}
2931
}
@@ -32,6 +34,8 @@ const FloorPanel: React.FC<FloorOptions> = props => {
3234
initFloorPlan()
3335
}, [props.id, props.token])
3436

37+
initFloorPlan()
38+
3539
return (
3640
<div className="plan-wrapper">
3741
<div ref={containerRef} className="plan-container"></div>

0 commit comments

Comments
 (0)