Merge pull request '평면도 확정 시 확인 다이얼로그 추가 (버튼/Enter 키)' (#798) from dev into dev-deploy
Reviewed-on: #798
This commit is contained in:
commit
55d9b065c3
@ -9,11 +9,13 @@ import { OUTER_LINE_TYPE } from '@/store/outerLineAtom'
|
|||||||
import OuterLineWall from '@/components/floor-plan/modal/lineTypes/OuterLineWall'
|
import OuterLineWall from '@/components/floor-plan/modal/lineTypes/OuterLineWall'
|
||||||
import { usePlacementShapeDrawing } from '@/hooks/surface/usePlacementShapeDrawing'
|
import { usePlacementShapeDrawing } from '@/hooks/surface/usePlacementShapeDrawing'
|
||||||
import { usePopup } from '@/hooks/usePopup'
|
import { usePopup } from '@/hooks/usePopup'
|
||||||
|
import { useSwal } from '@/hooks/useSwal'
|
||||||
import Image from 'next/image'
|
import Image from 'next/image'
|
||||||
|
|
||||||
export default function PlacementShapeDrawing({ id, pos = { x: 50, y: 230 } }) {
|
export default function PlacementShapeDrawing({ id, pos = { x: 50, y: 230 } }) {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
const { closePopup } = usePopup()
|
const { closePopup } = usePopup()
|
||||||
|
const { swalFire } = useSwal()
|
||||||
const [buttonAct, setButtonAct] = useState(1)
|
const [buttonAct, setButtonAct] = useState(1)
|
||||||
const [useCalcPad, setUseCalcPad] = useState(false)
|
const [useCalcPad, setUseCalcPad] = useState(false)
|
||||||
const types = [
|
const types = [
|
||||||
@ -155,7 +157,16 @@ export default function PlacementShapeDrawing({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
<button className="btn-frame modal mr5" onClick={handleRollback}>
|
<button className="btn-frame modal mr5" onClick={handleRollback}>
|
||||||
{getMessage('modal.cover.outline.rollback')}
|
{getMessage('modal.cover.outline.rollback')}
|
||||||
</button>
|
</button>
|
||||||
<button className="btn-frame modal act" onClick={handleFix}>
|
<button
|
||||||
|
className="btn-frame modal act"
|
||||||
|
onClick={() => {
|
||||||
|
swalFire({
|
||||||
|
type: 'confirm',
|
||||||
|
text: getMessage('modal.cover.outline.fix.confirm'),
|
||||||
|
confirmFn: handleFix,
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
>
|
||||||
{getMessage('modal.placement.surface.drawing.fix')}
|
{getMessage('modal.placement.surface.drawing.fix')}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -22,6 +22,8 @@ import {
|
|||||||
import { usePolygon } from '@/hooks/usePolygon'
|
import { usePolygon } from '@/hooks/usePolygon'
|
||||||
import { POLYGON_TYPE } from '@/common/common'
|
import { POLYGON_TYPE } from '@/common/common'
|
||||||
import { usePopup } from '@/hooks/usePopup'
|
import { usePopup } from '@/hooks/usePopup'
|
||||||
|
import { useSwal } from '@/hooks/useSwal'
|
||||||
|
import { useMessage } from '@/hooks/useMessage'
|
||||||
import { useSurfaceShapeBatch } from './useSurfaceShapeBatch'
|
import { useSurfaceShapeBatch } from './useSurfaceShapeBatch'
|
||||||
|
|
||||||
import { roofDisplaySelector } from '@/store/settingAtom'
|
import { roofDisplaySelector } from '@/store/settingAtom'
|
||||||
@ -48,6 +50,8 @@ export function usePlacementShapeDrawing(id) {
|
|||||||
const { setSurfaceShapePattern } = useRoofFn()
|
const { setSurfaceShapePattern } = useRoofFn()
|
||||||
const { changeSurfaceLineType } = useSurfaceShapeBatch({})
|
const { changeSurfaceLineType } = useSurfaceShapeBatch({})
|
||||||
const { handleSelectableObjects } = useObject()
|
const { handleSelectableObjects } = useObject()
|
||||||
|
const { swalFire } = useSwal()
|
||||||
|
const { getMessage } = useMessage()
|
||||||
|
|
||||||
const verticalHorizontalMode = useRecoilValue(verticalHorizontalModeState)
|
const verticalHorizontalMode = useRecoilValue(verticalHorizontalModeState)
|
||||||
const adsorptionRange = useRecoilValue(adsorptionRangeState)
|
const adsorptionRange = useRecoilValue(adsorptionRangeState)
|
||||||
@ -1089,7 +1093,11 @@ export function usePlacementShapeDrawing(id) {
|
|||||||
|
|
||||||
const enterCheck = (e) => {
|
const enterCheck = (e) => {
|
||||||
if (e.key === 'Enter') {
|
if (e.key === 'Enter') {
|
||||||
handleFix()
|
swalFire({
|
||||||
|
type: 'confirm',
|
||||||
|
text: getMessage('modal.cover.outline.fix.confirm'),
|
||||||
|
confirmFn: handleFix,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user