Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clinicaltrials
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
david Chavalarias
clinicaltrials
Commits
1c2a0b0b
Commit
1c2a0b0b
authored
Jul 10, 2017
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
double click on node creates meso view around this node
parent
0e78bab9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
15 deletions
+16
-15
Tinaweb.js
twmain/Tinaweb.js
+9
-4
enviroment.js
twmain/enviroment.js
+7
-11
No files found.
twmain/Tinaweb.js
View file @
1c2a0b0b
...
...
@@ -931,10 +931,6 @@ var TinaWebJS = function ( sigmacanvas ) {
// used for area (with global: TW.gui.circleSize)
// 'clickNode'- simple click, second event if one node
// POSS easy in new sigma.js:
// add doubleClick to select node + neighboors
// when circle area select
// ========================
// 1st event, even before we know if there are nodes
...
...
@@ -998,6 +994,15 @@ var TinaWebJS = function ( sigmacanvas ) {
// just before, at click event
})
// doubleClick creates new meso view around clicked node
partialGraph
.
bind
(
'doubleClickNode'
,
function
(
e
)
{
var
theNodeId
=
e
.
data
.
node
.
id
selInst
.
MultipleSelection2
(
{
nodes
:[
theNodeId
]}
)
let
newZoomState
=
Object
.
assign
(
TW
.
SystemState
(),
{
level
:
false
})
changeLevel
(
newZoomState
)
})
// when click in the empty background
// ==================================
if
(
TW
.
conf
.
deselectOnclickStage
)
{
...
...
twmain/enviroment.js
View file @
1c2a0b0b
...
...
@@ -557,7 +557,7 @@ function getNeighbors(sourceNids, relKey) {
//
// POSS: rewrite using .hidden instead of add/remove
//
function
changeLevel
()
{
function
changeLevel
(
optionalTgtState
)
{
// show waiting cursor
TW
.
gui
.
elHtml
.
classList
.
add
(
'waiting'
);
...
...
@@ -565,7 +565,8 @@ function changeLevel() {
setTimeout
(
function
()
{
var
present
=
TW
.
SystemState
();
// Last
var
sels
=
present
.
selectionNids
;
//[144, 384, 543]//TW.states[last].selectionNids;
// array of nids [144, 384, 543]
let
sels
=
optionalTgtState
?
optionalTgtState
.
selectionNids
:
present
.
selectionNids
let
selsChecker
=
{}
for
(
let
i
in
sels
)
{
...
...
@@ -613,9 +614,9 @@ function changeLevel() {
}
}
var
futurelevel
=
nul
l
var
futurelevel
=
optionalTgtState
?
optionalTgtState
.
level
:
!
present
.
leve
l
if
(
present
.
level
)
{
// [Change to Local] when level=Global(1)
if
(
!
future
level
)
{
// [Change to Local] when level=Global(1)
for
(
var
nid
in
nodesToAdd
)
add1Elem
(
nid
)
for
(
var
eid
in
edgesToAdd
)
...
...
@@ -632,9 +633,6 @@ function changeLevel() {
}
}
}
futurelevel
=
false
;
}
else
{
// [Change to Global] when level=Local(0)
// var t0 = performance.now()
...
...
@@ -650,17 +648,15 @@ function changeLevel() {
add1Elem
(
eid
)
}
}
// var t1 = performance.now()
futurelevel
=
true
;
// console.log("returning to global took:", t1-t0)
}
// sels and activereltypes unchanged, no need to call MultipleSelection2
TW
.
pushGUIState
({
level
:
futurelevel
level
:
futurelevel
,
sels
:
sels
})
TW
.
partialGraph
.
camera
.
goTo
({
x
:
0
,
y
:
0
,
ratio
:
1.2
,
angle
:
0
})
...
...
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