Bläddra i källkod

fix ZDM斜率不一致的问题 | PM优化颜色区分

zhanghaijun 3 år sedan
förälder
incheckning
736635ccf8

+ 1 - 1
scripts/Common/DrawPM.js

@@ -109,7 +109,7 @@ DrawPM.prototype.applyDrawing = function () {
     [new RColor(77, 255, 255), new RColor(77, 255, 255), new RColor(255, 255, 128), new RColor(255, 255, 0),],
     [new RColor(77, 255, 255), new RColor(77, 255, 255), new RColor(255, 255, 128), new RColor(255, 255, 0),],
     [new RColor(148, 121, 253), new RColor(148, 121, 253), new RColor(255, 192, 128), new RColor(255, 165, 0),]
     [new RColor(148, 121, 253), new RColor(148, 121, 253), new RColor(255, 192, 128), new RColor(255, 165, 0),]
   );
   );
-  var colorArray = array[this.colorIndex];
+  var colorArray = array[this.colorIndex % array.length];
   for (var i = 0; i < this.dataArray.length; i++) {
   for (var i = 0; i < this.dataArray.length; i++) {
     var data = this.dataArray[i];
     var data = this.dataArray[i];
     var type = data[0];
     var type = data[0];

+ 1 - 1
scripts/Common/DrawZdmAll.js

@@ -10,7 +10,7 @@ include("scripts/Common/FileZDM.js");
 // 有CTR,才画桥梁,隧道
 // 有CTR,才画桥梁,隧道
 function DrawZdmAll(ratio) {
 function DrawZdmAll(ratio) {
   // 比例尺
   // 比例尺
-  this.ratio = 1.0; //ratio || 10.0;
+  this.ratio = ratio || 10.0;
 }
 }
 
 
 DrawZdmAll.prototype.applyPainting = function (layer, dmxFile, zdmFile, ctrFile, isCertCsv) {
 DrawZdmAll.prototype.applyPainting = function (layer, dmxFile, zdmFile, ctrFile, isCertCsv) {

+ 1 - 1
scripts/Common/FileZDM.js

@@ -292,7 +292,7 @@ FileZDM.prototype.applySlope = function (startPoint, space) {
       addSimpleTextToView((round(angle * 100 * 1000) / 1000).toString(), [x - 2, y + 8], 7, rad2deg(textAngle || 0), "Standard", RS.VAlignTop, RS.HAlignLeft, false, false, 0);
       addSimpleTextToView((round(angle * 100 * 1000) / 1000).toString(), [x - 2, y + 8], 7, rad2deg(textAngle || 0), "Standard", RS.VAlignTop, RS.HAlignLeft, false, false, 0);
       addSimpleTextToView((round((item[0] - lastPoint[0]) * 1000) / 1000).toString(), [x - 2, y - 4], 7, rad2deg(textAngle || 0), "Standard", RS.VAlignTop, RS.HAlignLeft, false, false, 0);
       addSimpleTextToView((round((item[0] - lastPoint[0]) * 1000) / 1000).toString(), [x - 2, y - 4], 7, rad2deg(textAngle || 0), "Standard", RS.VAlignTop, RS.HAlignLeft, false, false, 0);
     } else {
     } else {
-      addSimpleTextToView((round(angle * 1000) / 1000).toString(), [x + 2, y + 8], 7, rad2deg(textAngle || 0), "Standard", RS.VAlignTop, RS.HAlignLeft, false, false, 0);
+      addSimpleTextToView((round(angle * 100 * 1000) / 1000).toString(), [x + 2, y + 8], 7, rad2deg(textAngle || 0), "Standard", RS.VAlignTop, RS.HAlignLeft, false, false, 0);
       addSimpleTextToView((round((item[0] - lastPoint[0]) * 1000) / 1000).toString(), [x - 2, y - 4], 7, rad2deg(textAngle || 0), "Standard", RS.VAlignTop, RS.HAlignLeft, false, false, 0);
       addSimpleTextToView((round((item[0] - lastPoint[0]) * 1000) / 1000).toString(), [x - 2, y - 4], 7, rad2deg(textAngle || 0), "Standard", RS.VAlignTop, RS.HAlignLeft, false, false, 0);
     }
     }
     // 绘画竖线
     // 绘画竖线

+ 1 - 1
scripts/Optimize/PMOptimize/PMOptimize.js

@@ -100,7 +100,7 @@ PMOptimize.prototype.opBtnClicked = function () {
       var convert = new CsvToPmConvert(array[i]);
       var convert = new CsvToPmConvert(array[i]);
       convert.convert();
       convert.convert();
       // 绘制PM
       // 绘制PM
-      var filePM = new DrawPM(convert.getPmFileName(), this.ratio, 0);
+      var filePM = new DrawPM(convert.getPmFileName(), this.ratio, i + 3);
       filePM.applyDrawing();
       filePM.applyDrawing();
     }
     }
     // 关闭弹框
     // 关闭弹框