|
@@ -52,6 +52,7 @@ open class FloorScene : SGraphyScene() {
|
|
|
var mapType: String? = "nothing"
|
|
|
var choseSpace: TunableSpaceItem? = null
|
|
|
var pipeLineList: ArrayList<PointF> = ArrayList()
|
|
|
+
|
|
|
/** 正在绘制的管道 */
|
|
|
val drawingPipeItemList = ArrayList<PipeLineItem>()
|
|
|
|
|
@@ -423,11 +424,21 @@ open class FloorScene : SGraphyScene() {
|
|
|
android.graphics.Point(e.x.toInt(), -e.y.toInt())
|
|
|
)
|
|
|
if (polygonContainsPoint) {
|
|
|
- space.outPaint.color = Color.rgb(0xbd, 0xe8, 0xfe)
|
|
|
- space.paint.color = Opt.spaceChoseColor
|
|
|
- mapType = "space"
|
|
|
- choseSpace = space
|
|
|
- hasChose = true
|
|
|
+ if (hasChose) {
|
|
|
+ if (space.calculateArea() < choseSpace!!.calculateArea()) {
|
|
|
+ space.outPaint.color = Color.rgb(0xbd, 0xe8, 0xfe)
|
|
|
+ space.paint.color = Opt.spaceChoseColor
|
|
|
+ mapType = "space"
|
|
|
+ choseSpace = space
|
|
|
+ hasChose = true
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ space.outPaint.color = Color.rgb(0xbd, 0xe8, 0xfe)
|
|
|
+ space.paint.color = Opt.spaceChoseColor
|
|
|
+ mapType = "space"
|
|
|
+ choseSpace = space
|
|
|
+ hasChose = true
|
|
|
+ }
|
|
|
} else {
|
|
|
space.paint.color = Opt.spaceColor
|
|
|
space.outPaint.color = Color.rgb(0xff, 0xff, 0xff)
|