|
@@ -48,6 +48,20 @@
|
|
|
:max="2"
|
|
|
/>
|
|
|
</div>
|
|
|
+ <div class="swi-col">
|
|
|
+ <span> 跟随场景转动 </span>
|
|
|
+ <switcher
|
|
|
+ :value="sky.antidistorted"
|
|
|
+ @change="(sa) => (sky.antidistorted = Boolean(sa))"
|
|
|
+ ></switcher>
|
|
|
+ </div>
|
|
|
+ <div class="swi-col">
|
|
|
+ <span> 应用到全部全景图 </span>
|
|
|
+ <switcher
|
|
|
+ :value="isApplySkyToAll"
|
|
|
+ @change="(sat) => (isApplySkyToAll = Boolean(sat))"
|
|
|
+ ></switcher>
|
|
|
+ </div>
|
|
|
<!-- sky end -->
|
|
|
<div style="margin: 30px 0"></div>
|
|
|
<!-- earth start -->
|
|
@@ -79,7 +93,6 @@
|
|
|
|
|
|
<div class="up-col">
|
|
|
<span> 缩放比例 </span>
|
|
|
-
|
|
|
<slider
|
|
|
v-model="earth.scale"
|
|
|
show-stops
|
|
@@ -89,16 +102,23 @@
|
|
|
:max="2"
|
|
|
/>
|
|
|
</div>
|
|
|
- <!-- earth end -->
|
|
|
-
|
|
|
- <div class="swi-col" style="padding-top: 15px">
|
|
|
+ <div class="swi-col">
|
|
|
+ <span> 跟随场景转动 </span>
|
|
|
+ <switcher
|
|
|
+ :value="earth.antidistorted"
|
|
|
+ @change="(ve) => (earth.antidistorted = Boolean(ve))"
|
|
|
+ ></switcher>
|
|
|
+ </div>
|
|
|
+ <div class="swi-col">
|
|
|
<span> 应用到全部全景图 </span>
|
|
|
<switcher
|
|
|
- :value="isApplyToAll"
|
|
|
- @change="(value) => (isApplyToAll = Boolean(value))"
|
|
|
+ :value="isApplyEarthToAll"
|
|
|
+ @change="(vet) => (isApplyEarthToAll = Boolean(vet))"
|
|
|
></switcher>
|
|
|
</div>
|
|
|
+ <!-- earth end -->
|
|
|
</template>
|
|
|
+
|
|
|
<div class="goto-4dkk-tip" v-if="currentScene.type === '4dkk'">
|
|
|
<div class="img-wrap">
|
|
|
<img
|
|
@@ -147,7 +167,8 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- isApplyToAll: false,
|
|
|
+ isApplySkyToAll: false,
|
|
|
+ isApplyEarthToAll: false,
|
|
|
isShowSelectionWindow: false,
|
|
|
isSelect: "",
|
|
|
scaleMarks: {
|
|
@@ -160,12 +181,14 @@ export default {
|
|
|
icon: "",
|
|
|
scale: 1,
|
|
|
fodderId: "",
|
|
|
+ antidistorted: false,
|
|
|
},
|
|
|
earth: {
|
|
|
isShow: false,
|
|
|
icon: "",
|
|
|
scale: 1,
|
|
|
fodderId: "",
|
|
|
+ antidistorted: false,
|
|
|
},
|
|
|
};
|
|
|
},
|
|
@@ -178,6 +201,7 @@ export default {
|
|
|
this.handlePeakStatus(val.isShow);
|
|
|
this.handlePeakScale(val.scale);
|
|
|
this.handlePeakURL(val.icon);
|
|
|
+ this.handlePeakDistorted(val.antidistorted);
|
|
|
}
|
|
|
},
|
|
|
deep: true,
|
|
@@ -190,18 +214,37 @@ export default {
|
|
|
this.handleNadirStatus(val.isShow);
|
|
|
this.handleNadirScale(val.scale);
|
|
|
this.handleNadirURL(val.icon);
|
|
|
+ this.handleNadirDistorted(val.antidistorted);
|
|
|
}
|
|
|
},
|
|
|
deep: true,
|
|
|
},
|
|
|
- isApplyToAll: {
|
|
|
+ isApplySkyToAll: {
|
|
|
+ handler: function (val) {
|
|
|
+ if (val) {
|
|
|
+ this.$confirm({
|
|
|
+ content: "是否应用到全部全景图?",
|
|
|
+ ok: () => {
|
|
|
+ this.$store.dispatch("scene/applycustomMaskToAll", "sky");
|
|
|
+ },
|
|
|
+ no: () => {
|
|
|
+ this.isApplySkyToAll = false;
|
|
|
+ },
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ immediate: true,
|
|
|
+ },
|
|
|
+ isApplyEarthToAll: {
|
|
|
handler: function (val) {
|
|
|
if (val) {
|
|
|
this.$confirm({
|
|
|
content: "是否应用到全部全景图?",
|
|
|
- ok: () => {},
|
|
|
+ ok: () => {
|
|
|
+ this.$store.dispatch("scene/applycustomMaskToAll", "earth");
|
|
|
+ },
|
|
|
no: () => {
|
|
|
- this.isApplyToAll = false;
|
|
|
+ this.isApplyEarthToAll = false;
|
|
|
},
|
|
|
});
|
|
|
}
|
|
@@ -209,11 +252,13 @@ export default {
|
|
|
immediate: true,
|
|
|
},
|
|
|
"currentScene.customMask": {
|
|
|
- handler: function (newVal) {
|
|
|
- if (newVal) {
|
|
|
+ handler: function (newVal, oldVal) {
|
|
|
+ if (newVal && newVal !== oldVal) {
|
|
|
const { sky, earth } = newVal;
|
|
|
- this.sky = sky;
|
|
|
- this.earth = earth;
|
|
|
+ this.isApplyEarthToAll = false;
|
|
|
+ this.isApplySkyToAll = false;
|
|
|
+ this.sky = { ...sky };
|
|
|
+ this.earth = { ...earth };
|
|
|
}
|
|
|
},
|
|
|
deep: true,
|
|
@@ -241,7 +286,6 @@ export default {
|
|
|
const status_b = !!status;
|
|
|
const kr = this.$getKrpano();
|
|
|
if (kr) {
|
|
|
- // console.log("handlePeakStatus", status);
|
|
|
kr.set("hotspot[peaklogo].visible", status_b);
|
|
|
}
|
|
|
},
|
|
@@ -257,6 +301,12 @@ export default {
|
|
|
kr.set("hotspot[peaklogo].scale", scale);
|
|
|
}
|
|
|
},
|
|
|
+ handlePeakDistorted(anti) {
|
|
|
+ const kr = this.$getKrpano();
|
|
|
+ if (kr) {
|
|
|
+ kr.set("hotspot[peaklogo].distorted", anti);
|
|
|
+ }
|
|
|
+ },
|
|
|
handleNadirStatus(status) {
|
|
|
const status_b = !!status;
|
|
|
const kr = this.$getKrpano();
|
|
@@ -276,6 +326,12 @@ export default {
|
|
|
kr.set("hotspot[nadirlogo].scale", scale);
|
|
|
}
|
|
|
},
|
|
|
+ handleNadirDistorted(anti) {
|
|
|
+ const kr = this.$getKrpano();
|
|
|
+ if (kr) {
|
|
|
+ kr.set("hotspot[nadirlogo].distorted", anti);
|
|
|
+ }
|
|
|
+ },
|
|
|
updateCurrentScene() {
|
|
|
this.$store.dispatch("scene/syncCurrentSceneToStore");
|
|
|
},
|
|
@@ -292,6 +348,7 @@ export default {
|
|
|
.cover-panel {
|
|
|
padding: 20px;
|
|
|
height: 100%;
|
|
|
+ overflow-y: scroll;
|
|
|
> .title {
|
|
|
font-size: 18px;
|
|
|
color: #fff;
|
|
@@ -309,7 +366,7 @@ export default {
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
flex-direction: row;
|
|
|
- margin: 10px 0;
|
|
|
+ margin: 12px 0;
|
|
|
}
|
|
|
.up-col {
|
|
|
flex-direction: column;
|