dev #617
@ -159,10 +159,6 @@ export function useContextMenu() {
|
|||||||
}
|
}
|
||||||
break
|
break
|
||||||
case 'roof':
|
case 'roof':
|
||||||
case 'auxiliaryLine':
|
|
||||||
case 'hip':
|
|
||||||
case 'ridge':
|
|
||||||
case 'eaveHelpLine':
|
|
||||||
if (selectedMenu === 'surface') {
|
if (selectedMenu === 'surface') {
|
||||||
setContextMenu([
|
setContextMenu([
|
||||||
[
|
[
|
||||||
@ -249,6 +245,73 @@ export function useContextMenu() {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
])
|
||||||
|
}
|
||||||
|
|
||||||
|
break
|
||||||
|
case 'auxiliaryLine':
|
||||||
|
case 'hip':
|
||||||
|
case 'ridge':
|
||||||
|
case 'eaveHelpLine':
|
||||||
|
if (selectedMenu === 'surface') {
|
||||||
|
setContextMenu([
|
||||||
|
[
|
||||||
|
{
|
||||||
|
id: 'sizeEdit',
|
||||||
|
name: getMessage('contextmenu.size.edit'),
|
||||||
|
component: <SizeSetting id={popupId} target={currentObject} />,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'rotate',
|
||||||
|
name: `${getMessage('contextmenu.rotate')}`,
|
||||||
|
fn: () => rotateSurfaceShapeBatch(),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'roofMaterialRemove',
|
||||||
|
shortcut: ['d', 'D'],
|
||||||
|
name: `${getMessage('contextmenu.remove')}(D)`,
|
||||||
|
fn: () => deleteObject(),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'roofMaterialMove',
|
||||||
|
shortcut: ['m', 'M'],
|
||||||
|
name: `${getMessage('contextmenu.move')}(M)`,
|
||||||
|
fn: () => moveSurfaceShapeBatch(),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'roofMaterialCopy',
|
||||||
|
shortcut: ['c', 'C'],
|
||||||
|
name: `${getMessage('contextmenu.copy')}(C)`,
|
||||||
|
fn: () => copyObject(),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
id: 'roofMaterialEdit',
|
||||||
|
name: getMessage('contextmenu.roof.material.edit'),
|
||||||
|
component: <ContextRoofAllocationSetting id={popupId} />,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'linePropertyEdit',
|
||||||
|
name: getMessage('contextmenu.line.property.edit'),
|
||||||
|
fn: () => {
|
||||||
|
if (+canvasSetting.roofSizeSet === 3) {
|
||||||
|
swalFire({ text: getMessage('contextmenu.line.property.edit.roof.size.3') })
|
||||||
|
} else {
|
||||||
|
addPopup(popupId, 1, <PlacementSurfaceLineProperty id={popupId} roof={currentObject} />)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// component: <LinePropertySetting id={popupId} target={currentObject} />,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'flowDirectionEdit',
|
||||||
|
name: getMessage('contextmenu.flow.direction.edit'),
|
||||||
|
component: <FlowDirectionSetting id={popupId} target={currentObject} />,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
])
|
||||||
|
} else if (selectedMenu === 'outline') {
|
||||||
|
setContextMenu([
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
id: 'sizeEdit',
|
id: 'sizeEdit',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user