😎fix: canvas loading bar 제어
This commit is contained in:
parent
ebaa0f5fba
commit
c596ef2d9f
@ -15,6 +15,7 @@ import { currentMenuState } from '@/store/canvasAtom'
|
||||
import { totalDisplaySelector } from '@/store/settingAtom'
|
||||
import { MENU } from '@/common/common'
|
||||
import { FloorPlanContext } from '@/app/floor-plan/FloorPlanProvider'
|
||||
import { QcastContext } from '@/app/QcastProvider'
|
||||
|
||||
export default function CanvasFrame() {
|
||||
const canvasRef = useRef(null)
|
||||
@ -25,6 +26,7 @@ export default function CanvasFrame() {
|
||||
const { contextMenu, handleClick } = useContextMenu()
|
||||
const { selectedPlan } = usePlan()
|
||||
const totalDisplay = useRecoilValue(totalDisplaySelector) // 집계표 표시 여부
|
||||
const { setIsGlobalLoading } = useContext(QcastContext)
|
||||
|
||||
const loadCanvas = () => {
|
||||
if (canvas) {
|
||||
@ -43,6 +45,10 @@ export default function CanvasFrame() {
|
||||
loadCanvas()
|
||||
}, [selectedPlan, canvas])
|
||||
|
||||
useEffect(() => {
|
||||
setIsGlobalLoading(false)
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="canvas-frame">
|
||||
<canvas ref={canvasRef} id="canvas" style={{ position: 'relative' }}></canvas>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user