Commit 8b7cb1da authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

temporary hide markers when dragging

parent 42bac9b7
......@@ -302,6 +302,9 @@
placeSlidingMarker: function(angle,distance){
// temporary sliding marker
this._hideMeasureMarkersTTs();
var p1_ll = this._measureBase;
var p2_ll = p1_ll.CoordinatesOf(angle,distance);
......@@ -341,6 +344,8 @@
removeSlidingMarker: function(){
this._showMeasureMarkersTTs();
if (this._slidingMarker != undefined){
this._layerPaint.removeLayer(this._slidingMarker);
......@@ -448,8 +453,6 @@
_syncMeasureMarkersToBasePoint: function(e){
console.log("sync measure markers");
if (this._measureMarkers.length!=0){
if (
(this._measureBase.lat!=this._latlng.lat)&&
......@@ -489,6 +492,8 @@
this._map.on('mousemove',this.setMarkerPoint,this);
this._map.on ('mouseup',this._mouseUp_M,this);
this._hideMeasureMarkersTTs();
}
},
......@@ -505,6 +510,8 @@
this.draggedMarker._index = null;
this._showMeasureMarkersTTs();
},
_updateMeasureMarkersIndices:function(){
......@@ -517,6 +524,26 @@
},
_hideMeasureMarkersTTs:function(){
var self = this;
this._measureMarkers.forEach(function(c,i){
self._measureMarkers[i].closeTooltip();
});
},
_showMeasureMarkersTTs:function(){
var self = this;
this._measureMarkers.forEach(function(c,i){
self._measureMarkers[i].openTooltip();
});
}
});
}(this,document));
......@@ -58,6 +58,17 @@ html, body, #x3d_wrapper {
position:absolute;
top: 16px;
left: 3px;
/*background-color: rgba(0,0,0,0);
border-color: rgba(0,0,0,0);
text-shadow:
-1px -1px 0 rgba(0,0,0,0),
1px -1px 0 rgba(0,0,0,0),
-1px 1px 0 rgba(0,0,0,0),
1px 1px 0 rgba(0,0,0,0);
box-shadow: none;*/
}
.leaflet-tooltip-left.measurementtooltip::before {
......
......@@ -547,6 +547,8 @@ function x3d_setShiftSpeed(){
function x3d_initial_camera_placement(mode){
console.log("x3d_initial_camera_placement");
if (mode==undefined){
// reset horizontal
mode = "r";
......
......@@ -771,6 +771,9 @@ X3DOMObject.Marker.prototype._registerEvents = function(){
X3DOMObject.Marker.mouseUp = function(){
//console.log("Drag STOP");
Map.marker._showMeasureMarkersTTs();
var elem = Scene.draggedTransformNode.parent().parent();
// click is already bound
......@@ -798,6 +801,8 @@ X3DOMObject.Marker.mouseUp = function(){
// from https://x3dom.org/x3dom/example/MovingObjectsWithDOMEvents.html
X3DOMObject.Marker.dragStart = function(elem){
//console.log("Drag START");
Scene.markerToDrag=elem;
// move up from <shape> to <transform>
......@@ -831,8 +836,12 @@ X3DOMObject.Marker.dragStart = function(elem){
}
// gets called when existing marker is dragged
X3DOMObject.Marker.mouseMove = function(event){
// hide ToolTips with meters and staff
Map.marker._hideMeasureMarkersTTs();
Scene.markerdragged = true;
var sphere = Scene.draggedTransformNode.parent().parent();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment