소스 검색

数据兼容

gemercheung 2 년 전
부모
커밋
1e51176ec4

+ 6 - 2
packages/qjkankan-editor/src/core/hotspot.js

@@ -48,12 +48,16 @@ const convertBaseStyle = (dest, origin) => {
         if (origin && origin.titleDisplayMode == "hover") {
             dest.visible = 2
         }
+        if ('visible' in origin && typeof origin.visible == "boolean") {
+            dest.visible = origin.visible ? 0 : 1
+            dest.style.position = "top"
+        }
         dest.style.borderColor = '';
         dest.style.fillColor = 'rgba(0,0,0,0.8)';
         dest.style.textColor = 'rgba(255,255,255,1)';
     }
-      //custom
-      if (origin && origin.hotspotIconType === 'serial_frame') {
+    //custom
+    if (origin && origin.hotspotIconType === 'serial_frame') {
         dest.style.duration = origin.serialFrameInfo.duration
         dest.style.frameNumber = origin.serialFrameInfo.frameNumber
         dest.style.frameWidth = origin.serialFrameInfo.frameWidth

+ 1 - 0
packages/qjkankan-view/public/showviewer/lib/krpano/tooltip.xml

@@ -386,6 +386,7 @@
        <!-- trace('hwidth::',get(hwidth)); -->
        copy(lwidth, layer[get(posName)].width);
        copy(lheight, layer[get(posName)].height);
+       trace(calc('当前热点pos::' + get(pos)));
        trace(calc('当前热点动态宽::' + get(hp)+"::"),get(lwidth));
        trace(calc('当前热点动态高::' + get(hp)+"::"),get(lheight));
 

+ 4 - 0
packages/qjkankan-view/src/sdk/QJKanKan/modules/hotspot.js

@@ -48,6 +48,10 @@ const convertBaseStyle = (dest, origin) => {
         if (origin && origin.titleDisplayMode == "hover") {
             dest.visible = 2
         }
+        if ('visible' in origin && typeof origin.visible == "boolean") {
+            dest.visible = origin.visible ? 0 : 1
+            dest.style.position = "top"
+        }
         dest.style.borderColor = '';
         dest.style.fillColor = 'rgba(0,0,0,0.8)';
         dest.style.textColor = 'rgba(255,255,255,1)';