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
d77d8c25
Commit
d77d8c25
authored
Jun 06, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding marker dragging over shapes... not done
parent
1d739c37
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
14 deletions
+32
-14
ui_init.js
js/ui_init.js
+2
-1
x3dom_init.js
js/x3dom_init.js
+30
-13
No files found.
js/ui_init.js
View file @
d77d8c25
...
...
@@ -15,7 +15,8 @@ var SETTINGS = {
'viewinfo'
:
true
,
'moreinfo'
:
true
,
'crosshair'
:
false
,
'shiftspeed'
:
0.01
'shiftspeed'
:
0.01
,
'verticaldrag'
:
false
}
$
(
function
(){
...
...
js/x3dom_init.js
View file @
d77d8c25
...
...
@@ -260,7 +260,24 @@ X3DOMObject.Shape.prototype._registerEvents = function(){
X3DOMObject
.
Marker
.
place
(
0
,
0
,
0
,
"sliding_sphere"
);
$
(
"#sliding_sphere"
).
find
(
"switch"
).
attr
(
"whichChoice"
,
-
1
);
}
/*
if (!SETTINGS.verticaldrag&&Scene.draggedMarker){
console.log("dragging not vertically");
//$(Scene.draggedMarker) - get id
var sphere = $(Scene.draggedMarker).parent().parent();
console.log(Scene.draggedMarker.parent().parent());
var index = parseInt(sphere.attr("id").substr(7));
console.log(index);
X3DOMObject.Marker.place(x,y,z,"my-sph-"+index);
}
*/
});
...
...
@@ -520,20 +537,12 @@ X3DOMObject.Marker.prototype._registerEvents = function(){
Map
.
dehighlightMarker
(
index
);
document
.
getElementById
(
"navInfo"
).
setAttribute
(
"type"
,
'"NONE"'
);
Scene
.
lastMouseX
=
event
.
offsetX
;
Scene
.
lastMouseY
=
event
.
offsetY
;
X3DOMObject
.
Marker
.
dragStart
(
this
);
//$(this).on('mousemove',x3d_markerDrag);
/*
$(Scene.element).on('mousemove',function(){
console.log("preMouseMove");
x3d_sceneMouseMove2();
},true);
*/
X3DOMObject
.
Marker
.
dragStart
(
this
);
Scene
.
element
.
addEventListener
(
'mousemove'
,
X3DOMObject
.
Marker
.
mouseMove
,
true
);
Scene
.
element
.
addEventListener
(
'mouseup'
,
X3DOMObject
.
Marker
.
mouseUp
,
true
);
...
...
@@ -559,8 +568,8 @@ X3DOMObject.Marker.mouseUp = function(){
}
*/
Scene
.
element
.
removeEventListener
(
'mouseup'
,
X3DOMObject
.
Marker
.
mouseUp
,
true
);
Scene
.
element
.
removeEventListener
(
'mousemove'
,
X3DOMObject
.
Marker
.
mouseMove
,
true
);
Scene
.
element
.
removeEventListener
(
'mouseup'
,
X3DOMObject
.
Marker
.
mouseUp
,
true
);
Scene
.
draggedTransformNode
=
null
;
Scene
.
draggingUpVec
=
null
;
...
...
@@ -627,6 +636,8 @@ X3DOMObject.Marker.mouseMove = function(event){
}
if
(
Scene
.
draggedTransformNode
){
// once we get out of the marker we will get correct world coordinates
console
.
log
(
event
);
X3DOMObject
.
Marker
.
drag
(
event
.
offsetX
-
Scene
.
lastMouseX
,
event
.
offsetY
-
Scene
.
lastMouseY
);
}
...
...
@@ -858,6 +869,9 @@ X3DOMObject.MapMarker.registerEvents = function(map_mark){
}
/**
* info template
*/
X3DOMObject
.
displayInfo
=
function
(
e
){
var
elem
=
Scene
.
element
;
...
...
@@ -910,6 +924,9 @@ X3DOMObject.displayInfo = function(e){
}
/**
* view info template
*/
X3DOMObject
.
displayViewInfo
=
function
(
e
){
if
(
!
e
.
target
){
...
...
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