xzw 5 months ago
parent
commit
c492ab0519
2 changed files with 7 additions and 4 deletions
  1. 6 3
      public/lib/potree/potree.js
  2. 1 1
      public/lib/potree/potree.js.map

+ 6 - 3
public/lib/potree/potree.js

@@ -18016,7 +18016,7 @@
 	      if (this.textBorderThick) {
 	        context.strokeStyle = 'rgba(' + this.textBorderColor.r + ',' + this.textBorderColor.g + ',' + this.textBorderColor.b + ',' + this.textBorderColor.a + ')';
 	        context.lineWidth = this.textBorderThick * r;
-	        context.strokeText(this.text[i], x, y);
+	        context.strokeText(texts[i], x, y);
 	      }
 	      if (this.textshadowColor) {
 	        context.shadowOffsetX = 0;
@@ -18111,6 +18111,8 @@
 	  return result;
 	} //'使用很寻常的二分查找,如果某一个位置之前的文字宽度小于等于设定的宽度,并且它之后一个字之前的文字宽度大于设定的宽度,那么这个位置就是文本的换行点。上面只是找到一个换行点,对于输入的一段文本,需要循环查找,直到不存在这样的换行点为止, 完整的代码如下',
 
+	//待改进:breakLinesForCanvas后的lineSpace稍小于预设的[]换行的lineSpace, 用于测量标签
+
 	/* 
 	function wrapText(text, maxWidth) {  
 	  // 创建一个 canvas 元素来测量文本宽度  
@@ -22536,7 +22538,7 @@
 	      }
 	      var getFromModel = () => {
 	        var _ref;
-	        var prop = (_ref = object.prop || object) === null || _ref === void 0 ? void 0 : _ref.raw;
+	        var prop = (_ref = object.props || object) === null || _ref === void 0 ? void 0 : _ref.raw;
 	        return prop && prop[name];
 	      };
 	      prefix = this[name] || getFromModel() || this['prefix' + num];
@@ -44818,7 +44820,8 @@
 	  //变为backColor距离 
 	  maxOcclusionFactor: 0.3,
 	  maxClipFactor: 0.8,
-	  maxLineWidth: 300
+	  maxLineWidth: 300,
+	  lineSpace: 6
 	};
 	var subLabelProp = {
 	  backgroundColor: {

File diff suppressed because it is too large
+ 1 - 1
public/lib/potree/potree.js.map