|
@@ -237,15 +237,33 @@ export default {
|
|
|
* 1.6 处理遮罩层
|
|
|
* @param {*} sky
|
|
|
*/
|
|
|
- handleSkyCover(sky) {
|
|
|
- if (sky) {
|
|
|
- if (sky.isShow) {
|
|
|
- this.$getKrpano().set("hotspot[peaklogo].visible", true);
|
|
|
- sky.icon && this.$getKrpano().set("hotspot[peaklogo].url", sky.icon);
|
|
|
- sky.scale &&
|
|
|
- this.$getKrpano().set("hotspot[peaklogo].scale", sky.scale);
|
|
|
- } else {
|
|
|
- this.$getKrpano().set("hotspot[peaklogo].visible", false);
|
|
|
+ handleSkyCover(skyMask) {
|
|
|
+ // console.log("handleSkyCover", skyMask);
|
|
|
+ if (skyMask) {
|
|
|
+ if ("isShow" in skyMask) {
|
|
|
+ this.$getKrpano().set(
|
|
|
+ `hotspot[peaklogo].visible`,
|
|
|
+ Boolean(skyMask.isShow)
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ if (skyMask.icon) {
|
|
|
+ this.$getKrpano().set(`hotspot[peaklogo].url`, skyMask.icon);
|
|
|
+ }
|
|
|
+ if ("scale" in skyMask) {
|
|
|
+ this.$getKrpano().set(`hotspot[peaklogo].scale`, skyMask.scale);
|
|
|
+ }
|
|
|
+ if ("antidistorted" in skyMask) {
|
|
|
+ this.$getKrpano().set(
|
|
|
+ `hotspot[peaklogo].distorted`,
|
|
|
+ skyMask.antidistorted
|
|
|
+ );
|
|
|
+ if (!skyMask.antidistorted) {
|
|
|
+ this.$getKrpano().set(
|
|
|
+ `hotspot[peaklogo].scale`,
|
|
|
+ skyMask.scale * 0.5
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -253,16 +271,31 @@ export default {
|
|
|
* 1.6 处理遮罩层
|
|
|
* @param {*} sky
|
|
|
*/
|
|
|
- handleEarthCover(earth) {
|
|
|
- if (earth) {
|
|
|
- if (earth.isShow) {
|
|
|
- this.$getKrpano().set("hotspot[nadirlogo].visible", true);
|
|
|
- earth.icon &&
|
|
|
- this.$getKrpano().set("hotspot[nadirlogo].url", earth.icon);
|
|
|
- earth.scale &&
|
|
|
- this.$getKrpano().set("hotspot[nadirlogo].scale", earth.scale);
|
|
|
- } else {
|
|
|
- this.$getKrpano().set("hotspot[nadirlogo].visible", false);
|
|
|
+ handleEarthCover(earthMask) {
|
|
|
+ if (earthMask) {
|
|
|
+ if ("isShow" in earthMask) {
|
|
|
+ this.$getKrpano().set(
|
|
|
+ `hotspot[nadirlogo].visible`,
|
|
|
+ Boolean(earthMask.isShow)
|
|
|
+ );
|
|
|
+ }
|
|
|
+ if (earthMask.icon) {
|
|
|
+ this.$getKrpano().set(`hotspot[nadirlogo].url`, earthMask.icon);
|
|
|
+ }
|
|
|
+ if ("scale" in earthMask) {
|
|
|
+ this.$getKrpano().set(`hotspot[nadirlogo].scale`, earthMask.scale);
|
|
|
+ }
|
|
|
+ if ("antidistorted" in earthMask) {
|
|
|
+ this.$getKrpano().set(
|
|
|
+ `hotspot[nadirlogo].distorted`,
|
|
|
+ earthMask.antidistorted
|
|
|
+ );
|
|
|
+ if (!earthMask.antidistorted) {
|
|
|
+ this.$getKrpano().set(
|
|
|
+ `hotspot[nadirlogo].scale`,
|
|
|
+ earthMask.scale * 0.5
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
},
|