Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kodex
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
gargantext
kodex
Commits
5aa126a6
Commit
5aa126a6
authored
Feb 07, 2019
by
Yannick Chudy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
btn layout
parent
2735b2c9
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
28 deletions
+34
-28
botapad-app.html
static/botapad-app.html
+14
-6
cello.min.js
static/cello.min.js
+1
-1
embed.min.js
static/embed.min.js
+1
-1
gviz.js
static/gviz.js
+1
-1
gviz.min.js
static/gviz.min.js
+2
-2
padagraph-gviz-min.html
static/padagraph-gviz-min.html
+15
-17
No files found.
static/botapad-app.html
View file @
5aa126a6
...
...
@@ -25,6 +25,11 @@
height
:
0px
;
padding-right
:
4px
;
}
#btn_2d3d
{
padding
:
7px
;
}
#btn_2d3d
span
.small
{
font-size
:
x-small
}
#btn_2d3d
span
.active
{
font-weight
:
bold
}
</style>
<template>
...
...
@@ -46,7 +51,9 @@
<div
class=
"ui divider"
></div>
<a
class=
"item"
id=
"btn_rotate"
><i
class=
"play icon"
></i></a>
<a
class=
"item"
id=
"btn_2d3d"
><i
class=
"cubes icon"
></i><span>
2D
<span></a>
<a
class=
"item"
id=
"btn_2d3d"
><i
class=
"cubes icon"
></i>
<span
class=
"active"
>
2D
</span><span>
/
</span><span
class=
'small'
>
3D
</span>
</a>
<div
class=
"ui divider"
></div>
...
...
@@ -167,10 +174,11 @@
});
$
(
'#btn_2d3d'
).
click
(()
=>
{
var
t
=
$
(
'#btn_2d3d'
).
text
();
t
=
t
==
"2D"
?
"3D"
:
"2D"
this
.
app
.
trigger
(
'engine:layout'
,
t
+
'_Force_directed'
)
$
(
'#btn_2d3d span'
).
text
(
t
)
var
t
=
$
(
'#btn_2d3d span.active'
).
text
();
t
=
t
==
"2D"
?
"3D"
:
"2D"
;
this
.
app
.
trigger
(
'engine:layout'
,
t
+
'_Force_directed'
)
$
(
'#btn_2d3d span'
).
toggleClass
(
'active'
)
$
(
'#btn_2d3d span'
).
toggleClass
(
'small'
)
});
},
attached
()
{
...
...
@@ -302,7 +310,7 @@
});
});
app
.
listenTo
(
app
.
models
.
graph
,
'reset'
,
function
(
response
,
args
,
state
)
{
app
.
listenTo
(
app
.
models
.
graph
,
'reset'
,
function
()
{
$
(
"padagraph-collection-filter"
).
each
(
function
(
i
,
e
)
{
if
(
e
.
graph
&&
e
.
reset_filters
)
e
.
reset_filters
();
});
...
...
static/cello.min.js
View file @
5aa126a6
This diff is collapsed.
Click to expand it.
static/embed.min.js
View file @
5aa126a6
This diff is collapsed.
Click to expand it.
static/gviz.js
View file @
5aa126a6
...
...
@@ -1090,7 +1090,7 @@ gviz.ThreeViz = Backbone.View.extend({
controls
.
dynamicDampingFactor
=
0.3
;
controls
.
minDistance
=
50
;
//custom
controls
.
autoRotateSpeed
=
0.00
2
;
controls
.
autoRotateSpeed
=
0.00
045
;
controls
.
AUTO_ROTATE
=
this
.
auto_rotate
// init renderer
...
...
static/gviz.min.js
View file @
5aa126a6
This diff is collapsed.
Click to expand it.
static/padagraph-gviz-min.html
View file @
5aa126a6
...
...
@@ -2046,14 +2046,6 @@ require(['backbone', 'cello', 'gviz', 'materials', 'pdgconst'], function (Backbo
if
(
!
app
||
graph
==
null
||
!
graph
.
vs
)
return
;
if
(
this
.
gviz
)
return
;
_
.
each
(
$
(
"padagraph-engine-control"
,
this
),
function
(
el
,
i
,
l
)
{
if
(
el
)
{
var
engine
=
app
.
engines
[
el
.
engine
];
el
.
app
=
app
;
if
(
engine
.
blocks
.
models
.
length
)
el
.
block
=
engine
.
blocks
.
models
[
0
];
}
});
var
filters
=
$
(
"padagraph-collection-filter"
,
this
);
if
(
filters
.
length
)
{
_
(
filters
).
forEach
(
function
(
f
)
{
...
...
@@ -2062,11 +2054,19 @@ require(['backbone', 'cello', 'gviz', 'materials', 'pdgconst'], function (Backbo
});
}
//graph.on('reset', ()=>{
//_(filters).forEach((f) => {
//f.reset_filters()
//});
//});
graph
.
on
(
'reset'
,
function
()
{
_
(
filters
).
forEach
(
function
(
f
)
{
f
.
reset_filters
();
});
});
_
.
each
(
$
(
"padagraph-engine-control"
),
function
(
el
,
i
,
l
)
{
if
(
el
)
{
var
engine
=
app
.
engines
[
el
.
engine
];
el
.
app
=
app
;
if
(
engine
.
blocks
.
models
.
length
)
el
.
block
=
engine
.
blocks
.
models
[
0
];
}
});
var
search
=
$
(
"padagraph-node-search"
);
if
(
search
.
length
)
{
...
...
@@ -2114,12 +2114,10 @@ require(['backbone', 'cello', 'gviz', 'materials', 'pdgconst'], function (Backbo
app
.
set_viz
(
gviz
);
var
ctrl
=
$
(
"padagraph-gviz-control"
);
if
(
ctrl
.
length
)
{
ctrl
=
ctrl
[
0
];
_
.
each
(
$
(
"padagraph-gviz-control"
),
function
(
ctrl
,
i
,
l
)
{
ctrl
.
app
=
app
;
ctrl
.
gviz
=
gviz
;
}
}
);
this
.
gviz
=
gviz
;
...
...
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