Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Knowledge Space WP Plugin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
alg
Knowledge Space WP Plugin
Commits
8e3a4477
Commit
8e3a4477
authored
3 years ago
by
Harm Kube
Browse files
Options
Downloads
Patches
Plain Diff
Displaying links as a list
parent
4460c4ec
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
display/display.css
+3
-3
3 additions, 3 deletions
display/display.css
display/overlays/neighbors.js
+6
-21
6 additions, 21 deletions
display/overlays/neighbors.js
with
9 additions
and
24 deletions
display/display.css
+
3
−
3
View file @
8e3a4477
...
@@ -302,10 +302,10 @@
...
@@ -302,10 +302,10 @@
}
}
.neighbor-content-links
{
.neighbor-content-links
{
padding
:
0
18
px
;
padding
:
5
px
;
display
:
none
;
display
:
none
;
overflow
:
hidden
;
overflow
:
hidden
;
background-color
:
#
000000
;
background-color
:
#
ffffff
;
flex-direction
:
row
;
flex-direction
:
column
;
overflow-x
:
auto
;
overflow-x
:
auto
;
}
}
This diff is collapsed.
Click to expand it.
display/overlays/neighbors.js
+
6
−
21
View file @
8e3a4477
import
*
as
Helpers
from
"
../helpers
"
;
import
*
as
Helpers
from
"
../helpers
"
;
import
jQuery
from
"
jquery
"
;
import
jQuery
from
"
jquery
"
;
import
*
as
Config
from
"
../../config
"
;
export
{
NodeNeighborOverlay
};
export
{
NodeNeighborOverlay
};
...
@@ -41,7 +40,9 @@ class NodeNeighborOverlay {
...
@@ -41,7 +40,9 @@ class NodeNeighborOverlay {
"
neighbor-content-tabs
"
,
"
neighbor-content-tabs
"
,
bottomContainerDiv
bottomContainerDiv
);
);
coll
.
style
.
display
=
"
flex
"
;
this
.
contentTab
=
contentTabs
;
this
.
contentTab
=
contentTabs
;
contentTabs
.
style
.
display
=
"
flex
"
;
coll
.
addEventListener
(
"
click
"
,
function
()
{
coll
.
addEventListener
(
"
click
"
,
function
()
{
if
(
contentTabs
.
style
.
display
===
"
flex
"
)
{
if
(
contentTabs
.
style
.
display
===
"
flex
"
)
{
contentTabs
.
style
.
display
=
"
none
"
;
contentTabs
.
style
.
display
=
"
none
"
;
...
@@ -104,22 +105,10 @@ class NodeNeighborOverlay {
...
@@ -104,22 +105,10 @@ class NodeNeighborOverlay {
*/
*/
createReference
(
target
)
{
createReference
(
target
)
{
const
linkDiv
=
document
.
createElement
(
"
div
"
);
const
linkDiv
=
document
.
createElement
(
"
div
"
);
linkDiv
.
className
=
"
link-img
"
;
var
linkText
=
document
.
createTextNode
(
"
-
"
+
target
.
name
);
linkDiv
.
appendChild
(
linkText
);
if
(
"
image
"
in
target
)
{
linkDiv
.
style
.
margin
=
"
2px
"
;
const
linkImage
=
document
.
createElement
(
"
img
"
);
linkDiv
.
style
.
cursor
=
"
pointer
"
;
linkImage
.
src
=
Config
.
PLUGIN_PATH
+
"
datasets/images/
"
+
target
.
image
;
linkDiv
.
appendChild
(
linkImage
);
}
if
(
"
name
"
in
target
)
{
Helpers
.
createHTMLElement
(
"
p
"
,
linkDiv
,
{
className
:
"
bottom-container-link-text
"
,
innerText
:
target
.
name
,
});
}
jQuery
(
linkDiv
).
on
(
"
click
"
,
()
=>
{
jQuery
(
linkDiv
).
on
(
"
click
"
,
()
=>
{
this
.
graph
.
focusOnNode
(
target
);
this
.
graph
.
focusOnNode
(
target
);
this
.
infoOverlay
.
updateInfoOverlay
(
target
);
this
.
infoOverlay
.
updateInfoOverlay
(
target
);
...
@@ -133,10 +122,6 @@ class NodeNeighborOverlay {
...
@@ -133,10 +122,6 @@ class NodeNeighborOverlay {
*/
*/
updateTabs
(
node
)
{
updateTabs
(
node
)
{
this
.
clearTabContentPages
();
this
.
clearTabContentPages
();
if
(
this
.
contentTab
.
style
.
display
===
"
flex
"
)
{
this
.
contentTab
.
style
.
display
=
"
none
"
;
}
for
(
const
link
of
node
.
links
)
{
for
(
const
link
of
node
.
links
)
{
const
target
=
link
.
source
==
node
?
link
.
target
:
link
.
source
;
const
target
=
link
.
source
==
node
?
link
.
target
:
link
.
source
;
const
reference
=
this
.
createReference
(
target
);
const
reference
=
this
.
createReference
(
target
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment