Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
石磊
/
cihai
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit cc88ba6e
authored
Jan 31, 2018
by
侯昆
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
js修改
1 parent
141e41db
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
12 deletions
serverside/cihai-app/src/main/webapp/WEB-INF/jsp/include/header.jsp
serverside/cihai-app/src/main/webapp/WEB-INF/jsp/word/statement_baike.jsp
serverside/cihai-app/src/main/webapp/static/images/bg-xiang.png
serverside/cihai-app/src/main/webapp/WEB-INF/jsp/include/header.jsp
View file @
cc88ba6
...
...
@@ -13,12 +13,14 @@
<script
src=
"${ctx}/static/js/plugins/jquery.min.js"
></script>
<script
src=
"${ctx}/static/js/vendor.js"
merge=
"true"
></script>
<script>
$
(
function
()
{
$
(
'.js-collapse'
).
each
(
function
()
{
var
$this
=
$
(
this
);
$
(
$this
.
attr
(
'href'
)).
on
(
'show.bs.collapse'
,
function
()
{
$
(
$this
.
siblings
().
attr
(
'href'
)).
collapse
(
'hide'
);
});
});
})
</script>
</head>
<body>
serverside/cihai-app/src/main/webapp/WEB-INF/jsp/word/statement_baike.jsp
View file @
cc88ba6
...
...
@@ -662,8 +662,7 @@
<script src="/static/js/plugins/vis/vis.min.js"></script>
<c:if test="${vo.word eq '心脏'}">
<script>
$(function () {
$(function() {
// 图谱
var nodeDatas = [{
atlasNodes: [{
...
...
@@ -1901,7 +1900,7 @@
]
}
];
// 图谱
function draw(atlasData, index) {
var container = document.getElementById('atlas-' + index);
var data = {
...
...
@@ -1911,13 +1910,13 @@
var options = {
nodes: {
shape: 'dot',
borderWidth: 2
,
size: 25
,
color: {
border: '#
6faae8
',
background: '#
ecf6ff
',
border: '#
bda29a
',
background: '#
bda29a
',
highlight: {
border: '#
6faae8
',
background: '#
ecf6ff
'
border: '#
bda29a
',
background: '#
bda29a
'
}
},
font: {
...
...
@@ -1932,21 +1931,21 @@
var $carouse = $('#carouselExampleControls'),
newVis = null,
oldVis = null;
$('a[data-toggle="tab"]').on('show.bs.tab', function
(e) {
$('a[data-toggle="tab"]').on('show.bs.tab', function(e) {
if ($(e.target).text() === '图谱') {
newVis = draw(nodeDatas, 0);
}
}).on('hidden.bs.tab', function
(e) {
}).on('hidden.bs.tab', function(e) {
if ($(e.target).text() === '图谱' && newVis) {
newVis.destroy();
$carouse.carousel(0);
}
});
$carouse.on('slid.bs.carousel', function
(data) {
$carouse.on('slid.bs.carousel', function(data) {
if (oldVis) oldVis.destroy();
})
.on('slide.bs.carousel', function
(data) {
.on('slide.bs.carousel', function(data) {
oldVis = newVis;
newVis = draw(nodeDatas, data.to);
})
...
...
serverside/cihai-app/src/main/webapp/static/images/bg-xiang.png
0 → 100644
View file @
cc88ba6
2.48 KB
Write
Preview
Markdown
is supported
Attach a file
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 post a comment