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
334da194
Commit
334da194
authored
Oct 22, 2018
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. click on icon
2. disabled autopan for popup
parent
a0d0d970
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
6 deletions
+26
-6
index.js
js/index.js
+26
-6
No files found.
js/index.js
View file @
334da194
...
...
@@ -189,6 +189,7 @@ function update_links(){
var
group
=
$
(
this
).
attr
(
"group"
);
var
vlist
=
""
;
var
latest_version
=
""
;
$
(
this
).
find
(
"version"
).
each
(
function
(
i
,
v
){
var
comments
=
$
(
this
).
find
(
"comments"
).
text
();
...
...
@@ -215,11 +216,13 @@ function update_links(){
var
link
=
"<a title='"
+
comments
+
"' href='"
+
link_url
+
"'>"
+
$
(
this
).
attr
(
"name"
)
+
"</a>, "
;
vlist
+=
link
;
latest_version
=
$
(
this
).
attr
(
"name"
);
});
vlist
=
vlist
.
slice
(
0
,
-
7
);
$
(
arow
).
attr
(
"vlist"
,
vlist
);
markers
[
$
(
arow
).
attr
(
"index"
)][
0
].
vlist
=
vlist
;
markers
[
$
(
arow
).
attr
(
"index"
)][
0
].
latest_version
=
latest_version
;
var
tmp
=
popup_message
(
markers
[
$
(
arow
).
attr
(
"index"
)]);
markers
[
$
(
arow
).
attr
(
"index"
)][
0
].
_popup
.
setContent
(
tmp
);
});
...
...
@@ -321,7 +324,22 @@ function parse_list(res){
function
popup_message
(
marker
){
var
msg
=
"<div><img class='pimg' alt='n/a' src='"
+
SETTINGS
.
basepath
+
"/"
+
marker
[
0
].
group
+
"/"
+
marker
[
0
].
name
+
"/thumb.jpeg' index='"
+
marker
[
0
].
index
+
"' ></img></div>"
;
var
center
=
map
.
getCenter
();
var
zoom
=
map
.
getZoom
();
var
link_url
=
[
"viewer.html"
,
"?basepath="
+
SETTINGS
.
basepath
,
"&group="
+
marker
[
0
].
group
,
"&path="
+
marker
[
0
].
name
,
"&ver="
+
marker
[
0
].
latest_version
,
"&rating="
+
SETTINGS
.
rating
,
"&lat="
+
center
.
lat
.
toFixed
(
8
),
"&lng="
+
center
.
lng
.
toFixed
(
8
),
"&zoom="
+
zoom
].
join
(
""
);
var
msg
=
"<div><a href='"
+
link_url
+
"'><img class='pimg' alt='n/a' src='"
+
SETTINGS
.
basepath
+
"/"
+
marker
[
0
].
group
+
"/"
+
marker
[
0
].
name
+
"/thumb.jpeg' index='"
+
marker
[
0
].
index
+
"' ></img></a></div>"
;
markers
.
forEach
(
function
(
c
,
i
){
if
(
marker
[
0
].
lat
==
c
[
0
].
lat
){
...
...
@@ -381,6 +399,8 @@ function register_row_events(elem){
// find all markers under this marker
var
tmp
=
popup_message
(
markers
[
index
]);
markers
[
index
][
0
].
_popup
.
setContent
(
tmp
);
// autopan make popup always visible
markers
[
index
][
0
].
_popup
.
options
.
autoPan
=
false
;
markers
[
index
][
0
].
openPopup
();
$
(
".plist"
).
each
(
function
(
i
,
c
){
...
...
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