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
Show 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;
...
@@ -3,6 +3,8 @@ var List;
var
markers
=
[];
var
markers
=
[];
var
selected
;
var
BLOCK_MOVEEND
=
false
;
var
BLOCK_MOVEEND
=
false
;
$
(
function
(){
$
(
function
(){
...
@@ -47,29 +49,62 @@ var Dragged = false;
...
@@ -47,29 +49,62 @@ var Dragged = false;
function
init_dragging
(){
function
init_dragging
(){
var
bigcounter
=
0
;
var
bigcounter
=
0
;
$
(
"#model_table img"
).
on
(
"load"
,
function
(){
$
(
"#model_table img"
).
on
(
"load"
,
function
(){
bigcounter
++
;
bigcounter
++
;
if
(
bigcounter
==
markers
.
length
){
if
(
bigcounter
==
markers
.
length
){
actual_dragging_init
();
actual_dragging_init
();
if
(
SETTINGS
.
model
!==
undefined
){
if
(
SETTINGS
.
model
!==
undefined
){
find_preselected_index
();
$
(
".arow"
)[
selected
].
click
();
place_selected_thumbnail
();
}
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
;
var
inviscounter
=
0
;
markers
.
forEach
(
function
(
c
,
i
){
markers
.
forEach
(
function
(
c
,
i
){
if
(
!
$
(
".arow[index="
+
i
+
"]"
).
is
(
":visible"
))
{
if
(
!
$
(
".arow[index="
+
i
+
"]"
).
is
(
":visible"
))
{
inviscounter
++
;
inviscounter
++
;
}
}
if
(
c
[
0
].
name
==
SETTINGS
.
model
){
//if(c[0].name==SETTINGS.model){
$
(
".arow"
)[
i
].
click
();
if
(
i
==
selected
){
//$(".arow")[i].click();
$
(
"#model_table"
).
css
({
$
(
"#model_table"
).
css
({
top
:
-
106
*
(
i
-
inviscounter
)
+
"px"
top
:
-
106
*
(
i
-
inviscounter
)
+
"px"
});
});
}
}
});
});
}
//$(".arow")[0].click();
}
});
}
}
...
@@ -173,6 +208,7 @@ function parse_list(res){
...
@@ -173,6 +208,7 @@ function parse_list(res){
//console.log("clicked"+this.index);
//console.log("clicked"+this.index);
// find all markers under this marker
// find all markers under this marker
$
(
".arow[index="
+
this
.
index
+
"]"
).
click
();
$
(
".arow[index="
+
this
.
index
+
"]"
).
click
();
//place_selected_thumbnail();
});
});
if
(
markers
[
index
]
==
undefined
)
{
if
(
markers
[
index
]
==
undefined
)
{
...
@@ -237,6 +273,9 @@ function register_row_events(elem){
...
@@ -237,6 +273,9 @@ function register_row_events(elem){
map
.
panTo
(
new
L
.
LatLng
(
lat
,
lng
));
map
.
panTo
(
new
L
.
LatLng
(
lat
,
lng
));
if
(
markers
[
index
]
!=
undefined
){
if
(
markers
[
index
]
!=
undefined
){
selected
=
index
;
// find all markers under this marker
// find all markers under this marker
var
tmp
=
popup_message
(
markers
[
index
]);
var
tmp
=
popup_message
(
markers
[
index
]);
markers
[
index
][
0
].
_popup
.
setContent
(
tmp
);
markers
[
index
][
0
].
_popup
.
setContent
(
tmp
);
...
@@ -365,6 +404,8 @@ function init_maps(){
...
@@ -365,6 +404,8 @@ function init_maps(){
});
});
//place_selected_thumbnail();
var
center
=
map
.
getCenter
();
var
center
=
map
.
getCenter
();
var
zoom
=
map
.
getZoom
();
var
zoom
=
map
.
getZoom
();
...
...
js/ui_init.js
View file @
a74b095d
...
@@ -65,7 +65,8 @@ var SETTINGS = {
...
@@ -65,7 +65,8 @@ var SETTINGS = {
'x3d'
:
""
,
'x3d'
:
""
,
'kml'
:
""
'kml'
:
""
},
},
'forcehide'
:[]
'forcehide'
:[],
'forceshow'
:[]
// 'kml' : "scene.kml"
// 'kml' : "scene.kml"
}
}
...
...
js/ui_menu.js
View file @
a74b095d
...
@@ -193,12 +193,20 @@ function save_rating_init(){
...
@@ -193,12 +193,20 @@ function save_rating_init(){
url
:
"store_rating.php?model="
+
SETTINGS
.
path
,
url
:
"store_rating.php?model="
+
SETTINGS
.
path
,
complete
:
function
(
response
){
complete
:
function
(
response
){
var
value
=
parseInt
(
response
.
responseText
);
var
value
=
parseInt
(
response
.
responseText
);
// this check defines if the page is public or private
if
(
isNaN
(
value
)){
if
(
isNaN
(
value
)){
value
=
5
;
value
=
5
;
// add elements ids
// add elements ids
SETTINGS
.
forcehide
.
push
(
"model_rating_tr"
);
SETTINGS
.
forcehide
.
push
(
"#model_rating_tr"
);
SETTINGS
.
forcehide
.
push
(
"kml_tr"
);
SETTINGS
.
forcehide
.
push
(
"#kml_tr"
);
}
else
{
SETTINGS
.
forceshow
.
push
(
".experimental"
);
}
}
$
(
"#model_rating"
).
val
(
value
);
$
(
"#model_rating"
).
val
(
value
);
// bind onchange
// bind onchange
$
(
"#model_rating"
).
on
(
'change'
,
function
(){
$
(
"#model_rating"
).
on
(
'change'
,
function
(){
...
@@ -240,17 +248,18 @@ function controls_showhide(){
...
@@ -240,17 +248,18 @@ function controls_showhide(){
if
(
!
SETTINGS
.
experimental
){
if
(
!
SETTINGS
.
experimental
){
$
(
".experimental"
).
hide
();
$
(
".experimental"
).
hide
();
SETTINGS
.
forceshow
.
forEach
(
function
(
c
,
i
){
$
(
c
).
show
();});
}
else
{
}
else
{
$
(
".experimental"
).
show
();
$
(
".experimental"
).
show
();
SETTINGS
.
forcehide
.
forEach
(
function
(
c
,
i
){
$
(
c
).
hide
();});
}
}
if
(
!
SETTINGS
.
edit
){
if
(
!
SETTINGS
.
edit
){
$
(
".edit"
).
hide
();
$
(
".edit"
).
hide
();
SETTINGS
.
forceshow
.
forEach
(
function
(
c
,
i
){
$
(
c
).
show
();});
}
else
{
}
else
{
$
(
".edit"
).
show
();
$
(
".edit"
).
show
();
SETTINGS
.
forcehide
.
forEach
(
function
(
c
,
i
){
SETTINGS
.
forcehide
.
forEach
(
function
(
c
,
i
){
$
(
c
).
hide
();});
$
(
"#"
+
c
).
hide
();
});
align_position
();
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