|
@@ -4,14 +4,16 @@ import { hotInfo, otherUrl } from '@/utils/http'
|
|
import { HotSpot, Krpano, Scene, View } from '@dage/krpano'
|
|
import { HotSpot, Krpano, Scene, View } from '@dage/krpano'
|
|
import HotIcon from '@/components/HotIcon'
|
|
import HotIcon from '@/components/HotIcon'
|
|
import { KrpanoMiddleware } from '@/components/KrpanoMiddleware'
|
|
import { KrpanoMiddleware } from '@/components/KrpanoMiddleware'
|
|
-import Zhot from '@/components/Zhot'
|
|
|
|
|
|
|
|
-// window.draggbleHotspotEvent = (ath: number, atv: number) => {
|
|
|
|
-// console.log(`ath: ${ath}, atv: ${atv}`)
|
|
|
|
-// }
|
|
|
|
|
|
+window.draggbleHotspotEvent = (ath: number, atv: number) => {
|
|
|
|
+ console.log(`ath: ${ath}, atv: ${atv}`)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type Props = {
|
|
|
|
+ setAcName: (val: string) => void
|
|
|
|
+}
|
|
|
|
|
|
-function A22Pano() {
|
|
|
|
- const [acName, setAcName] = useState('')
|
|
|
|
|
|
+function A22Pano({ setAcName }: Props) {
|
|
const [activeIdx, setActiveIdx] = useState(-1)
|
|
const [activeIdx, setActiveIdx] = useState(-1)
|
|
|
|
|
|
return (
|
|
return (
|
|
@@ -40,6 +42,7 @@ function A22Pano() {
|
|
]}
|
|
]}
|
|
>
|
|
>
|
|
<View hlookat={0} vlookat={0} fovType='MFOV' fov={120} fovMin={70} fovMax={130} />
|
|
<View hlookat={0} vlookat={0} fovType='MFOV' fov={120} fovMin={70} fovMax={130} />
|
|
|
|
+ {/* 待完善位置 */}
|
|
{hotInfo.cheQi2.map((item, index) => (
|
|
{hotInfo.cheQi2.map((item, index) => (
|
|
// 热点图标
|
|
// 热点图标
|
|
<HotSpot
|
|
<HotSpot
|
|
@@ -56,7 +59,7 @@ function A22Pano() {
|
|
onOut={() => setActiveIdx(-1)}
|
|
onOut={() => setActiveIdx(-1)}
|
|
onClick={() => setAcName(item.name)}
|
|
onClick={() => setAcName(item.name)}
|
|
// @ts-ignore
|
|
// @ts-ignore
|
|
- // onDown='draggable_hotspot()'
|
|
|
|
|
|
+ onDown='draggable_hotspot()'
|
|
>
|
|
>
|
|
<HotIcon
|
|
<HotIcon
|
|
isModel={item.tubiao === '文物' ? true : false}
|
|
isModel={item.tubiao === '文物' ? true : false}
|
|
@@ -71,8 +74,6 @@ function A22Pano() {
|
|
</Scene>
|
|
</Scene>
|
|
</Krpano>
|
|
</Krpano>
|
|
</KrpanoMiddleware>
|
|
</KrpanoMiddleware>
|
|
-
|
|
|
|
- {acName ? <Zhot name={acName} closeFu={() => setAcName('')} /> : null}
|
|
|
|
</div>
|
|
</div>
|
|
)
|
|
)
|
|
}
|
|
}
|