dev #166
@ -107,12 +107,25 @@ export default function CircuitTrestleSetting({ id }) {
|
||||
}
|
||||
}, [])
|
||||
|
||||
const capture = (type) => {
|
||||
beforeCapture()
|
||||
setTimeout(() => {
|
||||
handleCanvasToPng(type)
|
||||
afterCapture()
|
||||
}, 1000)
|
||||
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(() => {
|
||||
resolve(true)
|
||||
}, 1000)
|
||||
})
|
||||
}
|
||||
|
||||
// 캡쳐 전 처리
|
||||
const beforeCapture = () => {
|
||||
// setCanvasZoom(100)
|
||||
const x = canvas.width / 2
|
||||
const y = canvas.height / 2
|
||||
canvas.zoomToPoint(new fabric.Point(x, y), 0.5)
|
||||
setCanvasZoom(100)
|
||||
canvas.set({ zoom: 1 })
|
||||
canvas.viewportTransform = [1, 0, 0, 1, 0, 0]
|
||||
changeFontSize('lengthText', '28')
|
||||
changeFontSize('circuitNumber', '28')
|
||||
changeFontSize('flowText', '28')
|
||||
@ -121,9 +134,6 @@ export default function CircuitTrestleSetting({ id }) {
|
||||
|
||||
// 캡쳐 후 처리
|
||||
const afterCapture = () => {
|
||||
setCanvasZoom(100)
|
||||
canvas.set({ zoom: 1 })
|
||||
canvas.viewportTransform = [1, 0, 0, 1, 0, 0]
|
||||
changeFontSize('lengthText', lengthText.fontSize.value)
|
||||
changeFontSize('circuitNumber', circuitNumberText.fontSize.value)
|
||||
changeFontSize('flowText', flowText.fontSize.value)
|
||||
@ -387,9 +397,7 @@ export default function CircuitTrestleSetting({ id }) {
|
||||
.map((obj) => {
|
||||
obj.pcses = getStepUpListData()
|
||||
})
|
||||
beforeCapture()
|
||||
handleCanvasToPng(1)
|
||||
afterCapture()
|
||||
await capture(1)
|
||||
|
||||
//회로할당 저장 시 result=null인 경우에도 회로번호 텍스트 표시 유지 처리
|
||||
|
||||
@ -406,9 +414,7 @@ export default function CircuitTrestleSetting({ id }) {
|
||||
const result = await getEstimateData()
|
||||
|
||||
if (result) {
|
||||
beforeCapture()
|
||||
handleCanvasToPng(2)
|
||||
afterCapture()
|
||||
await capture(2)
|
||||
// 견적서 저장
|
||||
await saveEstimate(result)
|
||||
} else {
|
||||
|
||||
@ -89,7 +89,7 @@
|
||||
"plan.menu.placement.surface.all.remove": "配置面全体を削除",
|
||||
"plan.menu.module.circuit.setting": "モジュール配置、回路構成",
|
||||
"plan.menu.module.circuit.setting.default": "モジュール/架台設定",
|
||||
"modal.module.basic.setting.orientation.setting": "方位設定",
|
||||
"modal.module.basic.setting.orientation.setting": "方位/モジュール設定",
|
||||
"modal.module.basic.setting.orientation.setting.info": "※シミュレーション計算用方位を指定します。南の方位を設定してください。",
|
||||
"modal.module.basic.setting.orientation.setting.angle.passivity": "角度変更",
|
||||
"modal.module.basic.setting.module.roof.material": "屋根材",
|
||||
@ -97,7 +97,7 @@
|
||||
"modal.module.basic.setting.module.rafter.margin": "垂木の間隔",
|
||||
"modal.module.basic.setting.module.construction.method": "工法",
|
||||
"modal.module.basic.setting.module.under.roof": "屋根下地",
|
||||
"modal.module.basic.setting.module.setting": "モジュールの選択",
|
||||
"modal.module.basic.setting.module.setting": "架台設定",
|
||||
"modal.module.basic.setting.module.placement.area": "モジュール配置領域",
|
||||
"modal.module.basic.setting.module.placement.margin": "モジュール間の間隙",
|
||||
"modal.module.basic.setting.module.placement.area.eaves": "軒側",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user