|
@@ -38,18 +38,21 @@ const LabelDepthInfo = {
|
|
const markerSizeInfo = {
|
|
const markerSizeInfo = {
|
|
minSize : 25 , maxSize : 65, nearBound : 0.2, farBound : 4,
|
|
minSize : 25 , maxSize : 65, nearBound : 0.2, farBound : 4,
|
|
}
|
|
}
|
|
-const labelSizeInfo = {width2d:200}
|
|
|
|
|
|
+const labelSizeInfo = {width2d:190}
|
|
const mainLabelProp = {
|
|
const mainLabelProp = {
|
|
backgroundColor: {r: defaultColor.r*255, g: defaultColor.g*255, b: defaultColor.b*255, a:config.measure.default.opacity},
|
|
backgroundColor: {r: defaultColor.r*255, g: defaultColor.g*255, b: defaultColor.b*255, a:config.measure.default.opacity},
|
|
textColor: {r: textColor.r*255, g: textColor.g*255, b: textColor.b*255, a: 1.0},
|
|
textColor: {r: textColor.r*255, g: textColor.g*255, b: textColor.b*255, a: 1.0},
|
|
- fontsize:16,
|
|
|
|
- useDepth : true ,
|
|
|
|
|
|
+ fontsize: 14,
|
|
|
|
+ useDepth : true , borderRadius : 12, margin:{x:20,y:4},
|
|
renderOrder : 5, pickOrder:5,
|
|
renderOrder : 5, pickOrder:5,
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
const subLabelProp = {
|
|
const subLabelProp = {
|
|
- backgroundColor: {r: 255, g: 255, b: 255, a:1},
|
|
|
|
- textColor: {r: 0, g: 0, b:0, a: 1.0},
|
|
|
|
- fontsize:14,
|
|
|
|
|
|
+ backgroundColor: {r: 255, g: 255, b: 255, a:config.measure.default.opacity},
|
|
|
|
+ textColor: {r: 0.3, g: 0.3, b:0.3, a: 1.0},
|
|
|
|
+ fontsize:12, borderRadius : 12, margin:{x:20,y:4},
|
|
renderOrder : 4, pickOrder:4,
|
|
renderOrder : 4, pickOrder:4,
|
|
}
|
|
}
|
|
|
|
|
|
@@ -477,8 +480,8 @@ export class Measure extends ctrlPolygon{
|
|
//this.closed || this.edgeLabels.forEach(e=>e.elem.addClass('highLight') )
|
|
//this.closed || this.edgeLabels.forEach(e=>e.elem.addClass('highLight') )
|
|
this.setEdgesDisplay(true, hoverObject=="screenshot")
|
|
this.setEdgesDisplay(true, hoverObject=="screenshot")
|
|
|
|
|
|
- this.areaLabel && setLabelHightState(this.areaLabel, true)
|
|
|
|
- this.closed || this.edgeLabels.forEach(e=>setLabelHightState(e, true) )
|
|
|
|
|
|
+ this.areaLabel && this.setLabelHightState(this.areaLabel, true)
|
|
|
|
+ this.closed || this.edgeLabels.forEach(e=>this.setLabelHightState(e, true) )
|
|
|
|
|
|
}else{
|
|
}else{
|
|
this.markers.forEach(e=>this.setMarkerSelected(e, 'unhover', 'selectAll' ))
|
|
this.markers.forEach(e=>this.setMarkerSelected(e, 'unhover', 'selectAll' ))
|
|
@@ -487,8 +490,8 @@ export class Measure extends ctrlPolygon{
|
|
this.setEdgesDisplay(false, hoverObject=="screenshot")
|
|
this.setEdgesDisplay(false, hoverObject=="screenshot")
|
|
//this.areaLabel && this.areaLabel.elem.removeClass('highLight')
|
|
//this.areaLabel && this.areaLabel.elem.removeClass('highLight')
|
|
//this.closed || this.edgeLabels.forEach(e=>e.elem.removeClass('highLight') )
|
|
//this.closed || this.edgeLabels.forEach(e=>e.elem.removeClass('highLight') )
|
|
- this.areaLabel && setLabelHightState(this.areaLabel, false)
|
|
|
|
- this.closed || this.edgeLabels.forEach(e=>setLabelHightState(e, false) )
|
|
|
|
|
|
+ this.areaLabel && this.setLabelHightState(this.areaLabel, false)
|
|
|
|
+ this.closed || this.edgeLabels.forEach(e=>this.setLabelHightState(e, false) )
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -503,6 +506,32 @@ export class Measure extends ctrlPolygon{
|
|
viewer.mapViewer && viewer.mapViewer.dispatchEvent('content_changed')
|
|
viewer.mapViewer && viewer.mapViewer.dispatchEvent('content_changed')
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ setLabelHightState(label, state){
|
|
|
|
+ if(state){
|
|
|
|
+ label.backgroundColor = {r:255, g:255, b:255, a:config.measure.highlight.opacity},
|
|
|
|
+ //label.backgroundColor.a = config.measure.highlight.opacity
|
|
|
|
+ label.sprite.material.useDepth = false;
|
|
|
|
+ label.textColor = {r: this.color.r*255, g: this.color.g*255, b: this.color.b*255, a: 1}
|
|
|
|
+ }else{
|
|
|
|
+ label.backgroundColor = {r: this.color.r*255, g: this.color.g*255, b: this.color.b*255, a:config.measure.default.opacity}
|
|
|
|
+ //label.backgroundColor.a = config.measure.default.opacity
|
|
|
|
+ label.sprite.material.useDepth = true
|
|
|
|
+ label.textColor = {r: 255, g: 255, b: 255, a: 1}
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ label.updateTexture()
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
removeMarker(index ){
|
|
removeMarker(index ){
|
|
super.removeMarker(index)
|
|
super.removeMarker(index)
|
|
|
|
|
|
@@ -752,7 +781,7 @@ export class Measure extends ctrlPolygon{
|
|
transparent: !0,
|
|
transparent: !0,
|
|
opacity: 1,
|
|
opacity: 1,
|
|
map: texLoader.load(Potree.resourcePath+'/textures/pic_point32.png' ),
|
|
map: texLoader.load(Potree.resourcePath+'/textures/pic_point32.png' ),
|
|
- useDepth:true ,
|
|
|
|
|
|
+ //useDepth:true ,
|
|
replaceColor:this.color,
|
|
replaceColor:this.color,
|
|
beReplacedRed: 0.184, //0.18431372
|
|
beReplacedRed: 0.184, //0.18431372
|
|
mapColorReplace:true
|
|
mapColorReplace:true
|
|
@@ -773,7 +802,7 @@ export class Measure extends ctrlPolygon{
|
|
dashSize: 0.1,
|
|
dashSize: 0.1,
|
|
gapSize: 0.02,
|
|
gapSize: 0.02,
|
|
dashed: true,
|
|
dashed: true,
|
|
- lineWidth: config.measure.lineWidth
|
|
|
|
|
|
+ lineWidth: 2
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1081,37 +1110,6 @@ export class Measure extends ctrlPolygon{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-function setLabelHightState(label, state){
|
|
|
|
- /* if(state){
|
|
|
|
- label.backgroundColor = {r: highlightColor.r*255, g: highlightColor.g*255, b: highlightColor.b*255, a:config.measure.highlight.opacity},
|
|
|
|
- label.backgroundColor.a = config.measure.highlight.opacity
|
|
|
|
- label.sprite.material.useDepth = false;
|
|
|
|
-
|
|
|
|
- }else{
|
|
|
|
- label.backgroundColor = mainLabelProp.backgroundColor
|
|
|
|
- label.backgroundColor.a = config.measure.default.opacity
|
|
|
|
- label.sprite.material.useDepth = true
|
|
|
|
-
|
|
|
|
- } */
|
|
|
|
-
|
|
|
|
- if(state){
|
|
|
|
- //label.backgroundColor = {r: this.color[0]*255, g: this.color[1]*255, b: this.color[2]*255, a:config.measure.highlight.opacity},
|
|
|
|
- label.backgroundColor.a = config.measure.highlight.opacity
|
|
|
|
- label.sprite.material.useDepth = false;
|
|
|
|
-
|
|
|
|
- }else{
|
|
|
|
- //label.backgroundColor = {r: this.color[0]*255, g: this.color[1]*255, b: this.color[2]*255
|
|
|
|
- label.backgroundColor.a = config.measure.default.opacity
|
|
|
|
- label.sprite.material.useDepth = true
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- label.updateTexture()
|
|
|
|
- //label.sprite.material.needsUpdate = true
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
|
|
function createCircleRadiusLabel(){
|
|
function createCircleRadiusLabel(){
|
|
const circleRadiusLabel = new TextSprite("");
|
|
const circleRadiusLabel = new TextSprite("");
|