|
@@ -68,35 +68,37 @@ function PanoImg() {
|
|
|
vlookatMin={-90}
|
|
|
vlookatMax={90}
|
|
|
/>
|
|
|
- {/* 待完善 自己在的数据里面添加 字段louType 区分热点位置 1=一楼 2=2楼 3=庭院 */}
|
|
|
- {myData.banquet.hot.map((item, index) => (
|
|
|
- // 热点图标
|
|
|
- <HotSpot
|
|
|
- key={index}
|
|
|
- type='text'
|
|
|
- name={item.name}
|
|
|
- atv={item.atv}
|
|
|
- ath={item.ath}
|
|
|
- edge='top'
|
|
|
- distorted={true}
|
|
|
- scale={item.size}
|
|
|
- bg={false}
|
|
|
- onOver={() => setActiveIdx(index)}
|
|
|
- onOut={() => setActiveIdx(-1)}
|
|
|
- onClick={() => setInd(index)}
|
|
|
- // @ts-ignore
|
|
|
- // onDown='draggable_hotspot()'
|
|
|
- >
|
|
|
- <HotIcon
|
|
|
- isPano
|
|
|
- isModel={item.isModel ? true : false}
|
|
|
+ {/* 待完善 自己在的数据里面添加 字段louType 区分热点位置 1=一楼 2=2楼 3=庭院(字符串) */}
|
|
|
+ {myData.banquet.hot
|
|
|
+ .filter(c => c.louType === '1')
|
|
|
+ .map((item, index) => (
|
|
|
+ // 热点图标
|
|
|
+ <HotSpot
|
|
|
key={index}
|
|
|
- index={index}
|
|
|
- isHoverAc={activeIdx === index}
|
|
|
- hoverSrc={item.hoverSrc}
|
|
|
- />
|
|
|
- </HotSpot>
|
|
|
- ))}
|
|
|
+ type='text'
|
|
|
+ name={item.name}
|
|
|
+ atv={item.atv}
|
|
|
+ ath={item.ath}
|
|
|
+ edge='top'
|
|
|
+ distorted={true}
|
|
|
+ scale={item.size}
|
|
|
+ bg={false}
|
|
|
+ onOver={() => setActiveIdx(index)}
|
|
|
+ onOut={() => setActiveIdx(-1)}
|
|
|
+ onClick={() => setInd(index)}
|
|
|
+ // @ts-ignore
|
|
|
+ // onDown='draggable_hotspot()'
|
|
|
+ >
|
|
|
+ <HotIcon
|
|
|
+ isPano
|
|
|
+ isModel={item.isModel ? true : false}
|
|
|
+ key={index}
|
|
|
+ index={index}
|
|
|
+ isHoverAc={activeIdx === index}
|
|
|
+ hoverSrc={item.hoverSrc}
|
|
|
+ />
|
|
|
+ </HotSpot>
|
|
|
+ ))}
|
|
|
</Scene>
|
|
|
</Krpano>
|
|
|
</KrpanoMiddleware>
|