|
|
@ -1,4 +1,4 @@ |
|
|
|
const scaleFunc = (showEmpty, id, origin, scale) => { |
|
|
|
const scaleFunc = (showEmpty, id, origin, scale, isLow) => { |
|
|
|
if (origin) { |
|
|
|
document.querySelector(id).style['transform-origin'] = origin |
|
|
|
} |
|
|
@ -6,7 +6,16 @@ const scaleFunc = (showEmpty, id, origin, scale) => { |
|
|
|
handleBottomFont(id, scale) |
|
|
|
handleImgScale(id, scale) |
|
|
|
handleCooperation(id, scale) |
|
|
|
showEmpty.value = false |
|
|
|
handleContactUs(id, scale) |
|
|
|
if (id == '#service_container') { |
|
|
|
showEmpty.value = false |
|
|
|
} else { |
|
|
|
if (isLow) { |
|
|
|
showEmpty.value = false |
|
|
|
} else { |
|
|
|
showEmpty.value = true |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
export const handleScreenAuto = (showEmpty, id, origin) => { |
|
|
@ -14,10 +23,10 @@ export const handleScreenAuto = (showEmpty, id, origin) => { |
|
|
|
const clientWidth = document.documentElement.clientWidth |
|
|
|
if (clientHeight < 1080) { |
|
|
|
const scale = (clientHeight / 1080).toFixed(3) |
|
|
|
scaleFunc(showEmpty, id, origin, scale) |
|
|
|
scaleFunc(showEmpty, id, origin, scale, true) |
|
|
|
} else { |
|
|
|
const scale = ((clientHeight - 180) / 1080).toFixed(3) |
|
|
|
scaleFunc(showEmpty, id, origin, scale) |
|
|
|
const scale = ((clientHeight - 300) / 1080).toFixed(3) |
|
|
|
scaleFunc(showEmpty, id, 'center 0', scale, false) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -40,6 +49,17 @@ const handleImgScale = (id, scale) => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const handleContactUs = (id, scale) => { |
|
|
|
if (id == '#contractus_container') { |
|
|
|
document.getElementById('contact_circle').style.transform = `scale(${ |
|
|
|
1 / scale |
|
|
|
})`
|
|
|
|
document.getElementById('contact_hand').style.transform = `scale(${ |
|
|
|
1 / scale |
|
|
|
})`
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const handleCooperation = (id, scale) => { |
|
|
|
if (id == '#cooperation_container') { |
|
|
|
document.getElementById('contract_bg_coop').style['transform-origin'] = |
|
|
|