Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
x3domlet
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Elphel
x3domlet
Commits
8b7cb1da
Commit
8b7cb1da
authored
Jul 23, 2018
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
temporary hide markers when dragging
parent
42bac9b7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
2 deletions
+51
-2
leaflet.camera-view-marker.measure.js
js/leaflet/leaflet.camera-view-marker.measure.js
+29
-2
ui.css
js/ui.css
+11
-0
ui_init.js
js/ui_init.js
+2
-0
x3dom_init.js
js/x3dom_init.js
+9
-0
No files found.
js/leaflet/leaflet.camera-view-marker.measure.js
View file @
8b7cb1da
...
@@ -302,6 +302,9 @@
...
@@ -302,6 +302,9 @@
placeSlidingMarker
:
function
(
angle
,
distance
){
placeSlidingMarker
:
function
(
angle
,
distance
){
// temporary sliding marker
this
.
_hideMeasureMarkersTTs
();
var
p1_ll
=
this
.
_measureBase
;
var
p1_ll
=
this
.
_measureBase
;
var
p2_ll
=
p1_ll
.
CoordinatesOf
(
angle
,
distance
);
var
p2_ll
=
p1_ll
.
CoordinatesOf
(
angle
,
distance
);
...
@@ -341,6 +344,8 @@
...
@@ -341,6 +344,8 @@
removeSlidingMarker
:
function
(){
removeSlidingMarker
:
function
(){
this
.
_showMeasureMarkersTTs
();
if
(
this
.
_slidingMarker
!=
undefined
){
if
(
this
.
_slidingMarker
!=
undefined
){
this
.
_layerPaint
.
removeLayer
(
this
.
_slidingMarker
);
this
.
_layerPaint
.
removeLayer
(
this
.
_slidingMarker
);
...
@@ -448,8 +453,6 @@
...
@@ -448,8 +453,6 @@
_syncMeasureMarkersToBasePoint
:
function
(
e
){
_syncMeasureMarkersToBasePoint
:
function
(
e
){
console
.
log
(
"sync measure markers"
);
if
(
this
.
_measureMarkers
.
length
!=
0
){
if
(
this
.
_measureMarkers
.
length
!=
0
){
if
(
if
(
(
this
.
_measureBase
.
lat
!=
this
.
_latlng
.
lat
)
&&
(
this
.
_measureBase
.
lat
!=
this
.
_latlng
.
lat
)
&&
...
@@ -489,6 +492,8 @@
...
@@ -489,6 +492,8 @@
this
.
_map
.
on
(
'mousemove'
,
this
.
setMarkerPoint
,
this
);
this
.
_map
.
on
(
'mousemove'
,
this
.
setMarkerPoint
,
this
);
this
.
_map
.
on
(
'mouseup'
,
this
.
_mouseUp_M
,
this
);
this
.
_map
.
on
(
'mouseup'
,
this
.
_mouseUp_M
,
this
);
this
.
_hideMeasureMarkersTTs
();
}
}
},
},
...
@@ -505,6 +510,8 @@
...
@@ -505,6 +510,8 @@
this
.
draggedMarker
.
_index
=
null
;
this
.
draggedMarker
.
_index
=
null
;
this
.
_showMeasureMarkersTTs
();
},
},
_updateMeasureMarkersIndices
:
function
(){
_updateMeasureMarkersIndices
:
function
(){
...
@@ -517,6 +524,26 @@
...
@@ -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
));
}(
this
,
document
));
js/ui.css
View file @
8b7cb1da
...
@@ -58,6 +58,17 @@ html, body, #x3d_wrapper {
...
@@ -58,6 +58,17 @@ html, body, #x3d_wrapper {
position
:
absolute
;
position
:
absolute
;
top
:
16px
;
top
:
16px
;
left
:
3px
;
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
{
.leaflet-tooltip-left.measurementtooltip
::before
{
...
...
js/ui_init.js
View file @
8b7cb1da
...
@@ -547,6 +547,8 @@ function x3d_setShiftSpeed(){
...
@@ -547,6 +547,8 @@ function x3d_setShiftSpeed(){
function
x3d_initial_camera_placement
(
mode
){
function
x3d_initial_camera_placement
(
mode
){
console
.
log
(
"x3d_initial_camera_placement"
);
if
(
mode
==
undefined
){
if
(
mode
==
undefined
){
// reset horizontal
// reset horizontal
mode
=
"r"
;
mode
=
"r"
;
...
...
js/x3dom_init.js
View file @
8b7cb1da
...
@@ -771,6 +771,9 @@ X3DOMObject.Marker.prototype._registerEvents = function(){
...
@@ -771,6 +771,9 @@ X3DOMObject.Marker.prototype._registerEvents = function(){
X3DOMObject
.
Marker
.
mouseUp
=
function
(){
X3DOMObject
.
Marker
.
mouseUp
=
function
(){
//console.log("Drag STOP");
Map
.
marker
.
_showMeasureMarkersTTs
();
var
elem
=
Scene
.
draggedTransformNode
.
parent
().
parent
();
var
elem
=
Scene
.
draggedTransformNode
.
parent
().
parent
();
// click is already bound
// click is already bound
...
@@ -798,6 +801,8 @@ X3DOMObject.Marker.mouseUp = function(){
...
@@ -798,6 +801,8 @@ X3DOMObject.Marker.mouseUp = function(){
// from https://x3dom.org/x3dom/example/MovingObjectsWithDOMEvents.html
// from https://x3dom.org/x3dom/example/MovingObjectsWithDOMEvents.html
X3DOMObject
.
Marker
.
dragStart
=
function
(
elem
){
X3DOMObject
.
Marker
.
dragStart
=
function
(
elem
){
//console.log("Drag START");
Scene
.
markerToDrag
=
elem
;
Scene
.
markerToDrag
=
elem
;
// move up from <shape> to <transform>
// move up from <shape> to <transform>
...
@@ -831,8 +836,12 @@ X3DOMObject.Marker.dragStart = function(elem){
...
@@ -831,8 +836,12 @@ X3DOMObject.Marker.dragStart = function(elem){
}
}
// gets called when existing marker is dragged
X3DOMObject
.
Marker
.
mouseMove
=
function
(
event
){
X3DOMObject
.
Marker
.
mouseMove
=
function
(
event
){
// hide ToolTips with meters and staff
Map
.
marker
.
_hideMeasureMarkersTTs
();
Scene
.
markerdragged
=
true
;
Scene
.
markerdragged
=
true
;
var
sphere
=
Scene
.
draggedTransformNode
.
parent
().
parent
();
var
sphere
=
Scene
.
draggedTransformNode
.
parent
().
parent
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment