[1037] : [モジュール1枚を削除する時の表示]
[작업내용] : 모듈 선택시 아웃라인 두께 조정
This commit is contained in:
parent
56b8917345
commit
f03d35ec8d
@ -4,7 +4,7 @@ import { v4 as uuidv4 } from 'uuid'
|
|||||||
import { canvasSizeState, canvasState, canvasZoomState, currentMenuState, currentObjectState } from '@/store/canvasAtom'
|
import { canvasSizeState, canvasState, canvasZoomState, currentMenuState, currentObjectState } from '@/store/canvasAtom'
|
||||||
import { QPolygon } from '@/components/fabric/QPolygon'
|
import { QPolygon } from '@/components/fabric/QPolygon'
|
||||||
import { fontSelector } from '@/store/fontAtom'
|
import { fontSelector } from '@/store/fontAtom'
|
||||||
import { MENU } from '@/common/common'
|
import { MENU, POLYGON_TYPE } from '@/common/common'
|
||||||
|
|
||||||
// 캔버스에 필요한 이벤트
|
// 캔버스에 필요한 이벤트
|
||||||
export function useCanvasEvent() {
|
export function useCanvasEvent() {
|
||||||
@ -204,9 +204,12 @@ export function useCanvasEvent() {
|
|||||||
|
|
||||||
if (selected?.length > 0) {
|
if (selected?.length > 0) {
|
||||||
selected.forEach((obj) => {
|
selected.forEach((obj) => {
|
||||||
if (obj.type === 'QPolygon' && currentMenu !== MENU.MODULE_CIRCUIT_SETTING.BASIC_SETTING) {
|
// if (obj.type === 'QPolygon' && currentMenu !== MENU.MODULE_CIRCUIT_SETTING.BASIC_SETTING) {
|
||||||
|
if (obj.type === 'QPolygon') {
|
||||||
obj.set({ stroke: 'red' })
|
obj.set({ stroke: 'red' })
|
||||||
obj.bringToFront()
|
if (obj.name === POLYGON_TYPE.MODULE && currentMenu === MENU.MODULE_CIRCUIT_SETTING.BASIC_SETTING) {
|
||||||
|
obj.set({ strokeWidth: 3 })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
canvas.renderAll()
|
canvas.renderAll()
|
||||||
@ -218,10 +221,13 @@ export function useCanvasEvent() {
|
|||||||
|
|
||||||
if (deselected?.length > 0) {
|
if (deselected?.length > 0) {
|
||||||
deselected.forEach((obj) => {
|
deselected.forEach((obj) => {
|
||||||
if (obj.type === 'QPolygon' && currentMenu !== MENU.MODULE_CIRCUIT_SETTING.BASIC_SETTING) {
|
if (obj.type === 'QPolygon') {
|
||||||
if (obj.name !== 'moduleSetupSurface') {
|
if (obj.name !== 'moduleSetupSurface') {
|
||||||
obj.set({ stroke: 'black' })
|
obj.set({ stroke: 'black' })
|
||||||
}
|
}
|
||||||
|
if (obj.name === POLYGON_TYPE.MODULE && currentMenu === MENU.MODULE_CIRCUIT_SETTING.BASIC_SETTING) {
|
||||||
|
obj.set({ strokeWidth: 0.3 })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -234,17 +240,24 @@ export function useCanvasEvent() {
|
|||||||
|
|
||||||
if (deselected?.length > 0) {
|
if (deselected?.length > 0) {
|
||||||
deselected.forEach((obj) => {
|
deselected.forEach((obj) => {
|
||||||
if (obj.type === 'QPolygon' && currentMenu !== MENU.MODULE_CIRCUIT_SETTING.BASIC_SETTING) {
|
if (obj.type === 'QPolygon') {
|
||||||
obj.set({ stroke: 'black' })
|
obj.set({ stroke: 'black' })
|
||||||
|
if (obj.name === POLYGON_TYPE.MODULE && currentMenu === MENU.MODULE_CIRCUIT_SETTING.BASIC_SETTING) {
|
||||||
|
//모듈 미선택시 라인 두께 변경
|
||||||
|
obj.set({ strokeWidth: 0.3 })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selected?.length > 0) {
|
if (selected?.length > 0) {
|
||||||
selected.forEach((obj) => {
|
selected.forEach((obj) => {
|
||||||
if (obj.type === 'QPolygon' && currentMenu !== MENU.MODULE_CIRCUIT_SETTING.BASIC_SETTING) {
|
if (obj.type === 'QPolygon') {
|
||||||
obj.set({ stroke: 'red' })
|
obj.set({ stroke: 'red' })
|
||||||
obj.bringToFront()
|
if (obj.name === POLYGON_TYPE.MODULE && currentMenu === MENU.MODULE_CIRCUIT_SETTING.BASIC_SETTING) {
|
||||||
|
//모듈 선택시 라인 두께 변경
|
||||||
|
obj.set({ strokeWidth: 3 })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user