|
@@ -20,6 +20,7 @@ class WallLine extends FixedLine {
|
|
|
ground: SVGGElement
|
|
|
origin: SVGPathElement
|
|
|
temp: SVGGElement
|
|
|
+ testText: SVGTextElement
|
|
|
|
|
|
exterior: boolean
|
|
|
static minWidth = 0.1
|
|
@@ -325,6 +326,8 @@ class WallLine extends FixedLine {
|
|
|
node.appendChild(this.temp)
|
|
|
this.temp.setAttribute('pointer-events', 'none')
|
|
|
|
|
|
+ this.testText = document.createElementNS(SVGURI, 'text')
|
|
|
+ node.appendChild(this.testText)
|
|
|
|
|
|
return node
|
|
|
}
|
|
@@ -446,6 +449,18 @@ class WallLine extends FixedLine {
|
|
|
|
|
|
this.temp.innerHTML = ''
|
|
|
|
|
|
+
|
|
|
+ setTimeout(() => {
|
|
|
+ let center = lineCenter(this)
|
|
|
+ this.testText.setAttribute('fill', 'red')
|
|
|
+ this.testText.setAttribute('text-anchor', 'middle')
|
|
|
+ this.testText.setAttribute('dominant-baseline', 'middle')
|
|
|
+ this.testText.setAttribute('x', center.x.toString())
|
|
|
+ this.testText.setAttribute('y', center.y.toString())
|
|
|
+ this.testText.setAttribute('font-size', (12*this.multiple).toString())
|
|
|
+ this.testText.textContent = this.renderer.processing.lines.find(({ele}) => (ele as any) === this).id + ''
|
|
|
+ })
|
|
|
+
|
|
|
if (!this.showAngle && this.color !== this.hover.color) return;
|
|
|
|
|
|
let joinLines = this.renderer.processing.lines.filter(line =>
|