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
65ac9d4f
Commit
65ac9d4f
authored
Jul 17, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improved marker removing
parent
3d5b9027
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
ui_init.js
js/ui_init.js
+6
-1
x3dom_init.js
js/x3dom_init.js
+3
-1
No files found.
js/ui_init.js
View file @
65ac9d4f
...
...
@@ -428,6 +428,8 @@ function x3d_events(){
if
(
e
.
key
==
"Control"
){
Scene
.
_ctrlKey
=
true
;
var
x
,
y
,
z
;
var
dist
=
1111
;
...
...
@@ -438,7 +440,7 @@ function x3d_events(){
dist
=
parseFloat
(
mouse
.
d_xz
);
X3DOMObject
.
Marker
.
place
(
mouse
.
x
,
mouse
.
y
,
mouse
.
z
,
"sliding_sphere"
);
$
(
"#sliding_sphere"
).
find
(
"switch"
).
attr
(
"whichChoice"
,
0
);
if
(
Scene
.
highlighted_marker_index
==
null
)
$
(
"#sliding_sphere"
).
find
(
"switch"
).
attr
(
"whichChoice"
,
0
);
}
...
...
@@ -458,6 +460,9 @@ function x3d_events(){
if
(
e
.
key
==
"Control"
){
Scene
.
_ctrlKey
=
false
;
//remove on keydown?
X3DOMObject
.
Marker
.
place
(
0
,
0
,
0
,
"sliding_sphere"
);
$
(
"#sliding_sphere"
).
find
(
"switch"
).
attr
(
"whichChoice"
,
-
1
);
...
...
js/x3dom_init.js
View file @
65ac9d4f
...
...
@@ -304,13 +304,14 @@ X3DOMObject.Shape.prototype._registerEvents = function(){
var
y
=
e
.
originalEvent
.
worldY
;
var
z
=
e
.
originalEvent
.
worldZ
;
// store x3dom event to use in normal events
//
(not used atm)
store x3dom event to use in normal events
self
.
_stored_x3dom_event
=
e
.
originalEvent
;
if
(
self
.
_ctrlKey
||
SETTINGS
.
pointer
){
// place pointer marker
$
(
"#sliding_sphere"
).
find
(
'material'
).
attr
(
"diffuseColor"
,
convert_color_l2x
(
SETTINGS
.
markercolor
));
$
(
"#sliding_sphere"
).
find
(
'material'
).
attr
(
"transparency"
,
"0.2"
);
$
(
"#sliding_sphere"
).
find
(
'Sphere'
).
attr
(
"radius"
,
SETTINGS
.
markersize
/
2
);
X3DOMObject
.
Marker
.
place
(
x
,
y
,
z
,
"sliding_sphere"
);
...
...
@@ -664,6 +665,7 @@ X3DOMObject.Marker.prototype._registerEvents = function(){
Map
.
deleteMarker
(
index
);
Scene
.
highlighted_marker_index
=
null
;
}
}
else
{
...
...
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