Merge branch 'dev' of https://git.hanasys.jp/qcast3/qcast-front into feature/ysCha
This commit is contained in:
commit
8b80277884
@ -4,7 +4,7 @@ import { v4 as uuidv4 } from 'uuid'
|
||||
import { canvasSizeState, canvasState, canvasZoomState, currentMenuState, currentObjectState } from '@/store/canvasAtom'
|
||||
import { QPolygon } from '@/components/fabric/QPolygon'
|
||||
import { fontSelector } from '@/store/fontAtom'
|
||||
import { MENU } from '@/common/common'
|
||||
import { MENU, POLYGON_TYPE } from '@/common/common'
|
||||
|
||||
// 캔버스에 필요한 이벤트
|
||||
export function useCanvasEvent() {
|
||||
@ -204,9 +204,12 @@ export function useCanvasEvent() {
|
||||
|
||||
if (selected?.length > 0) {
|
||||
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.bringToFront()
|
||||
if (obj.name === POLYGON_TYPE.MODULE && currentMenu === MENU.MODULE_CIRCUIT_SETTING.BASIC_SETTING) {
|
||||
obj.set({ strokeWidth: 3 })
|
||||
}
|
||||
}
|
||||
})
|
||||
canvas.renderAll()
|
||||
@ -218,10 +221,13 @@ export function useCanvasEvent() {
|
||||
|
||||
if (deselected?.length > 0) {
|
||||
deselected.forEach((obj) => {
|
||||
if (obj.type === 'QPolygon' && currentMenu !== MENU.MODULE_CIRCUIT_SETTING.BASIC_SETTING) {
|
||||
if (obj.type === 'QPolygon') {
|
||||
if (obj.name !== 'moduleSetupSurface') {
|
||||
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) {
|
||||
deselected.forEach((obj) => {
|
||||
if (obj.type === 'QPolygon' && currentMenu !== MENU.MODULE_CIRCUIT_SETTING.BASIC_SETTING) {
|
||||
if (obj.type === 'QPolygon') {
|
||||
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) {
|
||||
selected.forEach((obj) => {
|
||||
if (obj.type === 'QPolygon' && currentMenu !== MENU.MODULE_CIRCUIT_SETTING.BASIC_SETTING) {
|
||||
if (obj.type === 'QPolygon') {
|
||||
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