|
@@ -51,6 +51,7 @@ class Space3DActivity : RxAppCompatActivity(), DIAware, View.OnClickListener {
|
|
|
var pointZModel: PointZ? = null
|
|
|
var lineModel: ArrayList<PointZ?>? = ArrayList()
|
|
|
var isClose = false
|
|
|
+ var is2D = false
|
|
|
private lateinit var projectId: String
|
|
|
private var objTypeCode: String = ""
|
|
|
private var problemTypeCode: String = ""
|
|
@@ -380,6 +381,7 @@ class Space3DActivity : RxAppCompatActivity(), DIAware, View.OnClickListener {
|
|
|
meshObject = null
|
|
|
detailRl.visibility = View.GONE
|
|
|
signProblem.visibility = View.GONE
|
|
|
+ addProblem.visibility = View.VISIBLE
|
|
|
// Toast.makeText(this, meshObject!!.ID, Toast.LENGTH_LONG).show()
|
|
|
}
|
|
|
}
|
|
@@ -498,13 +500,17 @@ class Space3DActivity : RxAppCompatActivity(), DIAware, View.OnClickListener {
|
|
|
R.id.tv2d -> {
|
|
|
meshObject = null
|
|
|
webview.loadUrl("javascript:UpdateCameraType(${2})")
|
|
|
+ is2D = true
|
|
|
tv2d.background = getDrawable(R.drawable.bg_blue_round)
|
|
|
tv3d.background = getDrawable(R.color.trans)
|
|
|
reset2DTools()
|
|
|
}
|
|
|
R.id.tv3d -> {
|
|
|
meshObject = null
|
|
|
- webview.loadUrl("javascript:UpdateCameraType(${1})")
|
|
|
+ if (is2D) {
|
|
|
+ webview.loadUrl("javascript:UpdateCameraType(${1})")
|
|
|
+ is2D = false
|
|
|
+ }
|
|
|
tv3d.background = getDrawable(R.drawable.bg_blue_round)
|
|
|
tv2d.background = getDrawable(R.color.trans)
|
|
|
reset3DTools()
|
|
@@ -619,8 +625,8 @@ class Space3DActivity : RxAppCompatActivity(), DIAware, View.OnClickListener {
|
|
|
point.setCompoundDrawablesWithIntrinsicBounds(
|
|
|
null, resources.getDrawable(R.drawable.icon_point_blue), null, null
|
|
|
)
|
|
|
- window.setTextColor(getColor(R.color.blue_0091FF))
|
|
|
- window.background = getDrawable(R.drawable.bg_blue_e1f2ff_round)
|
|
|
+// window.setTextColor(getColor(R.color.blue_0091FF))
|
|
|
+// window.background = getDrawable(R.drawable.bg_blue_e1f2ff_round)
|
|
|
}
|
|
|
R.id.parking -> {
|
|
|
objTypeCode = "CFPKPS"
|
|
@@ -692,7 +698,10 @@ class Space3DActivity : RxAppCompatActivity(), DIAware, View.OnClickListener {
|
|
|
problemDone.visibility = View.GONE
|
|
|
// cameraTypeTools.visibility = View.VISIBLE
|
|
|
mapTools.visibility = View.VISIBLE
|
|
|
- webview.loadUrl("javascript:UpdateCameraType(${1})")
|
|
|
+ if (is2D) {
|
|
|
+ webview.loadUrl("javascript:UpdateCameraType(${1})")
|
|
|
+ is2D = false
|
|
|
+ }
|
|
|
resetReverseTools()
|
|
|
isClose = false
|
|
|
}
|
|
@@ -919,7 +928,10 @@ class Space3DActivity : RxAppCompatActivity(), DIAware, View.OnClickListener {
|
|
|
}
|
|
|
|
|
|
private fun refresh3DView() {
|
|
|
- webview.loadUrl("javascript:UpdateCameraType(${1})")
|
|
|
+ if (is2D) {
|
|
|
+ webview.loadUrl("javascript:UpdateCameraType(${1})")
|
|
|
+ is2D = false
|
|
|
+ }
|
|
|
signProblem.visibility = View.GONE
|
|
|
addProblem.visibility = View.VISIBLE
|
|
|
drawTools.visibility = View.GONE
|
|
@@ -1039,6 +1051,7 @@ class Space3DActivity : RxAppCompatActivity(), DIAware, View.OnClickListener {
|
|
|
|
|
|
private fun resetDrawTools() {
|
|
|
webview.loadUrl("javascript:UpdateCameraType(${2})")
|
|
|
+ is2D = true
|
|
|
addProblem.visibility = View.GONE
|
|
|
forwardTools.visibility = View.GONE
|
|
|
reverseTools.visibility = View.GONE
|