소스 검색

Merge branch 'master' of http://114.244.114.158:8802/siwei/real3d-portalsite

zpf 11 달 전
부모
커밋
9ff5be659e
1개의 변경된 파일4개의 추가작업 그리고 9개의 파일을 삭제
  1. 4 9
      src/components/sceneAtttribute/camera/camera.vue

+ 4 - 9
src/components/sceneAtttribute/camera/camera.vue

@@ -496,9 +496,7 @@ export default {
       camera.flyCircleLoop = true;
     },
     flyStart() {
-      console.log(flyManager, "flyManager");
-
-      if (flyManager) {
+      if (flyManager && this.routeSpeed !=0) {
         flyManager.play();
       } else {
         let routes = new Cesium.RouteCollection(viewer.entities);
@@ -534,8 +532,6 @@ export default {
             for (let i = 0, j = allStops.length; i < j; i++) {
               let option = document.createElement("option");
               option.textContent = Resource.stop + (i + 1);
-              console.log(Resource, "asdas");
-
               option.value = allStops[i].index;
               menu.appendChild(option);
             }
@@ -754,8 +750,6 @@ export default {
         isAlongLine: "False",
         routeStops: this.state.routeStops,
       };
-
-      console.log(this.routeSpeed, "this.routeSpeed");
       let xml = createXml.createXMLflyLine(route);
       flyLineXmls[0] = xml;
       this.state.isSaveAutoFlag = true; //一旦点击保存,开启实时自动保存
@@ -946,10 +940,11 @@ export default {
     routeSpeed: {
       handler: function (newValue, oldValue) {
         // 当myObject对象的属性发生变化时,这个函数会被调用
-        // console.log('state changed:', newValue, oldValue);
-        if (newValue != oldValue) {
+        if (newValue != oldValue && newValue != 0) {
           this.saveStop();
           this.flyStart(); //开始
+        }else{
+          this.flyStop();
         }
       },
       deep: true, // 表示要深度监听