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
a74b095d
Commit
a74b095d
authored
Aug 31, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
force enable loop player for internal access
parent
88148030
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
18 deletions
+69
-18
index.js
js/index.js
+53
-12
ui_init.js
js/ui_init.js
+2
-1
ui_menu.js
js/ui_menu.js
+14
-5
No files found.
js/index.js
View file @
a74b095d
...
...
@@ -3,6 +3,8 @@ var List;
var
markers
=
[];
var
selected
;
var
BLOCK_MOVEEND
=
false
;
$
(
function
(){
...
...
@@ -47,32 +49,65 @@ var Dragged = false;
function
init_dragging
(){
var
bigcounter
=
0
;
$
(
"#model_table img"
).
on
(
"load"
,
function
(){
bigcounter
++
;
if
(
bigcounter
==
markers
.
length
){
actual_dragging_init
();
if
(
SETTINGS
.
model
!==
undefined
){
var
inviscounter
=
0
;
markers
.
forEach
(
function
(
c
,
i
){
if
(
!
$
(
".arow[index="
+
i
+
"]"
).
is
(
":visible"
))
{
inviscounter
++
;
}
find_preselected_index
();
$
(
".arow"
)[
selected
].
click
()
;
place_selected_thumbnail
();
if
(
c
[
0
].
name
==
SETTINGS
.
model
){
$
(
".arow"
)[
i
].
click
();
$
(
"#model_table"
).
css
({
top
:
-
106
*
(
i
-
inviscounter
)
+
"px"
});
}
});
}
else
{
// if not defined then do not click at '0' - this will allow to place view properly
}
//$(".arow")[0].click();
}
});
}
function
find_preselected_index
(){
markers
.
forEach
(
function
(
c
,
i
){
if
(
c
[
0
].
name
==
SETTINGS
.
model
){
selected
=
i
;
}
});
if
(
selected
===
undefined
){
selected
=
0
;
}
}
function
place_selected_thumbnail
(){
var
inviscounter
=
0
;
markers
.
forEach
(
function
(
c
,
i
){
if
(
!
$
(
".arow[index="
+
i
+
"]"
).
is
(
":visible"
))
{
inviscounter
++
;
}
//if(c[0].name==SETTINGS.model){
if
(
i
==
selected
){
//$(".arow")[i].click();
$
(
"#model_table"
).
css
({
top
:
-
106
*
(
i
-
inviscounter
)
+
"px"
});
}
});
}
function
actual_dragging_init
(){
var
list
=
document
.
getElementById
(
'model_table'
);
...
...
@@ -173,6 +208,7 @@ function parse_list(res){
//console.log("clicked"+this.index);
// find all markers under this marker
$
(
".arow[index="
+
this
.
index
+
"]"
).
click
();
//place_selected_thumbnail();
});
if
(
markers
[
index
]
==
undefined
)
{
...
...
@@ -237,6 +273,9 @@ function register_row_events(elem){
map
.
panTo
(
new
L
.
LatLng
(
lat
,
lng
));
if
(
markers
[
index
]
!=
undefined
){
selected
=
index
;
// find all markers under this marker
var
tmp
=
popup_message
(
markers
[
index
]);
markers
[
index
][
0
].
_popup
.
setContent
(
tmp
);
...
...
@@ -365,6 +404,8 @@ function init_maps(){
});
//place_selected_thumbnail();
var
center
=
map
.
getCenter
();
var
zoom
=
map
.
getZoom
();
...
...
js/ui_init.js
View file @
a74b095d
...
...
@@ -65,7 +65,8 @@ var SETTINGS = {
'x3d'
:
""
,
'kml'
:
""
},
'forcehide'
:[]
'forcehide'
:[],
'forceshow'
:[]
// 'kml' : "scene.kml"
}
...
...
js/ui_menu.js
View file @
a74b095d
...
...
@@ -193,12 +193,20 @@ function save_rating_init(){
url
:
"store_rating.php?model="
+
SETTINGS
.
path
,
complete
:
function
(
response
){
var
value
=
parseInt
(
response
.
responseText
);
// this check defines if the page is public or private
if
(
isNaN
(
value
)){
value
=
5
;
// add elements ids
SETTINGS
.
forcehide
.
push
(
"model_rating_tr"
);
SETTINGS
.
forcehide
.
push
(
"kml_tr"
);
SETTINGS
.
forcehide
.
push
(
"#model_rating_tr"
);
SETTINGS
.
forcehide
.
push
(
"#kml_tr"
);
}
else
{
SETTINGS
.
forceshow
.
push
(
".experimental"
);
}
$
(
"#model_rating"
).
val
(
value
);
// bind onchange
$
(
"#model_rating"
).
on
(
'change'
,
function
(){
...
...
@@ -240,17 +248,18 @@ function controls_showhide(){
if
(
!
SETTINGS
.
experimental
){
$
(
".experimental"
).
hide
();
SETTINGS
.
forceshow
.
forEach
(
function
(
c
,
i
){
$
(
c
).
show
();});
}
else
{
$
(
".experimental"
).
show
();
SETTINGS
.
forcehide
.
forEach
(
function
(
c
,
i
){
$
(
c
).
hide
();});
}
if
(
!
SETTINGS
.
edit
){
$
(
".edit"
).
hide
();
SETTINGS
.
forceshow
.
forEach
(
function
(
c
,
i
){
$
(
c
).
show
();});
}
else
{
$
(
".edit"
).
show
();
SETTINGS
.
forcehide
.
forEach
(
function
(
c
,
i
){
$
(
"#"
+
c
).
hide
();
});
SETTINGS
.
forcehide
.
forEach
(
function
(
c
,
i
){
$
(
c
).
hide
();});
align_position
();
}
...
...
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