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
e3625ec2
Commit
e3625ec2
authored
Aug 31, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pass back index and rating value
parent
0c25b567
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
5 deletions
+27
-5
index.js
js/index.js
+22
-4
ui_init.js
js/ui_init.js
+4
-0
ui_menu.js
js/ui_menu.js
+1
-1
No files found.
js/index.js
View file @
e3625ec2
...
...
@@ -38,7 +38,8 @@ var SETTINGS = {
'showall'
:
false
,
'lat'
:
40.7233861
,
'lng'
:
-
111.9328843
,
'zoom'
:
12
'zoom'
:
12
,
'model'
:
undefined
};
var
Dragged
=
false
;
...
...
@@ -49,7 +50,23 @@ function init_dragging(){
$
(
"#model_table img"
).
on
(
"load"
,
function
(){
bigcounter
++
;
if
(
bigcounter
==
markers
.
length
){
actual_dragging_init
()
actual_dragging_init
();
if
(
SETTINGS
.
model
!==
undefined
){
var
inviscounter
=
0
;
markers
.
forEach
(
function
(
c
,
i
){
if
(
!
$
(
".arow[index="
+
i
+
"]"
).
is
(
":visible"
))
{
inviscounter
++
;
}
if
(
c
[
0
].
name
==
SETTINGS
.
model
){
$
(
".arow"
)[
i
].
click
();
$
(
"#model_table"
).
css
({
top
:
-
106
*
(
i
-
inviscounter
)
+
"px"
});
}
});
}
//$(".arow")[0].click();
}
});
...
...
@@ -86,6 +103,7 @@ function parseURL(){
case
"lat"
:
SETTINGS
.
lat
=
parseFloat
(
parameters
[
i
][
1
]);
break
;
case
"lng"
:
SETTINGS
.
lng
=
parseFloat
(
parameters
[
i
][
1
]);
break
;
case
"zoom"
:
SETTINGS
.
zoom
=
parseFloat
(
parameters
[
i
][
1
]);
break
;
case
"model"
:
SETTINGS
.
model
=
parameters
[
i
][
1
];
break
;
}
}
}
...
...
@@ -94,7 +112,7 @@ function parse_list(res){
var
index
=
0
;
$
(
res
).
find
(
"model"
).
each
(
function
(){
$
(
res
).
find
(
"model"
).
each
(
function
(
m_index
,
m_item
){
var
row
=
$
(
"<tr class='arow'>"
);
var
name
=
$
(
this
).
attr
(
"name"
);
...
...
@@ -115,7 +133,7 @@ function parse_list(res){
var
comments
=
$
(
this
).
find
(
"comments"
).
text
();
var
link_url
=
"viewer.html?path="
+
name
+
"&ver="
+
$
(
this
).
attr
(
"name"
);
var
link_url
=
"viewer.html?path="
+
name
+
"&ver="
+
$
(
this
).
attr
(
"name"
)
+
"&rating="
+
SETTINGS
.
rating
;
var
link
=
"<a title='"
+
comments
+
"' href='"
+
link_url
+
"'>"
+
$
(
this
).
attr
(
"name"
)
+
"</a>, "
;
vlist
+=
link
;
...
...
js/ui_init.js
View file @
e3625ec2
...
...
@@ -44,6 +44,7 @@ var Scene;
var
Map
;
var
SETTINGS
=
{
'rating'
:
5
,
// global rating setting
'pointer'
:
false
,
'highlight'
:
false
,
'global_coordinates'
:
true
,
...
...
@@ -87,6 +88,9 @@ function parseURL(){
for
(
var
i
=
0
;
i
<
parameters
.
length
;
i
++
)
parameters
[
i
]
=
parameters
[
i
].
split
(
"="
);
for
(
var
i
=
1
;
i
<
parameters
.
length
;
i
++
)
{
switch
(
parameters
[
i
][
0
])
{
// used only to get back to the map
case
"rating"
:
SETTINGS
.
rating
=
parseInt
(
parameters
[
i
][
1
]);
break
;
case
"pointer"
:
SETTINGS
.
pointer
=
true
;
break
;
case
"highlight"
:
SETTINGS
.
highlight
=
true
;
break
;
case
"global_coordinates"
:
SETTINGS
.
global_coordinates
=
true
;
break
;
...
...
js/ui_menu.js
View file @
e3625ec2
...
...
@@ -64,7 +64,7 @@ function menu_init(){
var
origin
=
window
.
location
.
origin
;
var
path
=
window
.
location
.
pathname
;
path
=
path
.
substr
(
0
,
path
.
lastIndexOf
(
"/"
));
window
.
location
.
href
=
origin
+
path
;
window
.
location
.
href
=
origin
+
path
+
"?model="
+
SETTINGS
.
path
+
"&rating="
+
SETTINGS
.
rating
;
});
$
(
"#download_button"
).
on
(
"click"
,
function
(){
...
...
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