diff --git a/src/component/common/Geo3DBuilder.js b/src/component/common/Geo3DBuilder.js index ef402414..3879d2ca 100644 --- a/src/component/common/Geo3DBuilder.js +++ b/src/component/common/Geo3DBuilder.js @@ -319,6 +319,7 @@ Geo3DBuilder.prototype = { polygonMesh.on('mousemove', this._onmousemove, this); polygonMesh.on('mouseout', this._onmouseout, this); + polygonMesh.on('mousedown', this._onmousedown, this); }, _updateDebugWireframe: function (componentModel) { @@ -342,6 +343,15 @@ Geo3DBuilder.prototype = { } }, + _onmousedown: function (e) { + var dataIndex = this._dataIndexOfVertex[e.triangle[0]]; + if (dataIndex == null) { + dataIndex = -1; + } + this._lastHoverDataIndex = dataIndex; + this._polygonMesh.dataIndex = dataIndex; + }, + _onmousemove: function (e) { var dataIndex = this._dataIndexOfVertex[e.triangle[0]]; if (dataIndex == null) {