Merge branch 'dev' of https://git.jetbrains.space/nalpari/q-cast-iii/qcast-front into dev
This commit is contained in:
commit
19905e5f08
@ -33,6 +33,7 @@ import RowInsert from '@/components/floor-plan/modal/module/row/RowInsert'
|
|||||||
import CircuitNumberEdit from '@/components/floor-plan/modal/module/CircuitNumberEdit'
|
import CircuitNumberEdit from '@/components/floor-plan/modal/module/CircuitNumberEdit'
|
||||||
import { useObjectBatch } from '@/hooks/object/useObjectBatch'
|
import { useObjectBatch } from '@/hooks/object/useObjectBatch'
|
||||||
import { useSurfaceShapeBatch } from '@/hooks/surface/useSurfaceShapeBatch'
|
import { useSurfaceShapeBatch } from '@/hooks/surface/useSurfaceShapeBatch'
|
||||||
|
import { fontSelector, globalFontAtom } from '@/store/fontAtom'
|
||||||
|
|
||||||
export function useContextMenu() {
|
export function useContextMenu() {
|
||||||
const currentMenu = useRecoilValue(currentMenuState) // 현재 메뉴
|
const currentMenu = useRecoilValue(currentMenuState) // 현재 메뉴
|
||||||
@ -51,6 +52,9 @@ export function useContextMenu() {
|
|||||||
const { handleZoomClear } = useCanvasEvent()
|
const { handleZoomClear } = useCanvasEvent()
|
||||||
const { moveObjectBatch } = useObjectBatch({})
|
const { moveObjectBatch } = useObjectBatch({})
|
||||||
const { moveSurfaceShapeBatch } = useSurfaceShapeBatch()
|
const { moveSurfaceShapeBatch } = useSurfaceShapeBatch()
|
||||||
|
const [globalFont, setGlobalFont] = useRecoilState(globalFontAtom)
|
||||||
|
const commonTextFont = useRecoilValue(fontSelector('commonText'))
|
||||||
|
|
||||||
const currentMenuSetting = () => {
|
const currentMenuSetting = () => {
|
||||||
switch (currentMenu) {
|
switch (currentMenu) {
|
||||||
case MENU.PLAN_DRAWING:
|
case MENU.PLAN_DRAWING:
|
||||||
@ -417,7 +421,26 @@ export function useContextMenu() {
|
|||||||
{
|
{
|
||||||
id: 'commonTextFontSetting',
|
id: 'commonTextFontSetting',
|
||||||
name: getMessage('contextmenu.font.setting'),
|
name: getMessage('contextmenu.font.setting'),
|
||||||
component: <FontSetting id={popupId} type={'commonText'} />,
|
component: (
|
||||||
|
<FontSetting
|
||||||
|
id={popupId}
|
||||||
|
type={'commonText'}
|
||||||
|
font={commonTextFont}
|
||||||
|
onSave={(font) => {
|
||||||
|
setGlobalFont((prev) => {
|
||||||
|
return {
|
||||||
|
...prev,
|
||||||
|
commonText: {
|
||||||
|
fontFamily: font.fontFamily,
|
||||||
|
fontWeight: font.fontWeight,
|
||||||
|
fontSize: font.fontSize,
|
||||||
|
fontColor: font.fontColor,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'commonTextEdit',
|
id: 'commonTextEdit',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user