Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
medema-group
BiG-SCAPE
Commits
5b45a50a
Commit
5b45a50a
authored
Nov 15, 2018
by
Kautsar, Satria
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Family tree SVG now have proper scalable width
parent
ee49871a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
html_template/output/html_content/js/bigscape.js
html_template/output/html_content/js/bigscape.js
+17
-4
No files found.
html_template/output/html_content/js/bigscape.js
View file @
5b45a50a
...
...
@@ -398,6 +398,11 @@ function Bigscape(bs_data, bs_families, bs_alignment, bs_similarity, network_con
$
(
this
).
attr
(
"
width
"
,
$
(
this
).
find
(
"
g
"
)[
0
].
getBoundingClientRect
().
width
);
$
(
this
).
attr
(
"
height
"
,
$
(
this
).
find
(
"
g
"
)[
0
].
getBoundingClientRect
().
height
);
});
var
bbox_svg
=
handler
.
data
.
det_ui
.
find
(
"
svg#det_fam_tree
"
)[
0
].
getBBox
();
handler
.
data
.
det_ui
.
find
(
"
svg#det_fam_tree
"
).
attr
({
"
height
"
:
bbox_svg
.
height
+
50
,
"
width
"
:
bbox_svg
.
width
+
250
});
handler
.
stopPropagation
();
});
(
$
(
"
<li>
"
).
appendTo
(
ul
)).
append
(
aShowFamDetail
);
...
...
@@ -534,6 +539,11 @@ BigscapeFunc.updateDescription = function(ids, bs_svg, bs_data, bs_to_cl, bs_fam
$
(
this
).
attr
(
"
width
"
,
$
(
this
).
find
(
"
g
"
)[
0
].
getBoundingClientRect
().
width
);
$
(
this
).
attr
(
"
height
"
,
$
(
this
).
find
(
"
g
"
)[
0
].
getBoundingClientRect
().
height
);
});
var
bbox_svg
=
handler
.
data
.
det_ui
.
find
(
"
svg#det_fam_tree
"
)[
0
].
getBBox
();
handler
.
data
.
det_ui
.
find
(
"
svg#det_fam_tree
"
).
attr
({
"
height
"
:
bbox_svg
.
height
+
50
,
"
width
"
:
bbox_svg
.
width
+
250
});
handler
.
stopPropagation
();
});
li
.
find
(
"
a.li-check
"
).
click
({
bigscape
:
bigscape
,
fam
:
bs_families
[
i
]},
function
(
handler
)
{
...
...
@@ -838,6 +848,11 @@ BigscapeFunc.openFamDetail = function(id_fam, ids_highlighted, bs_svg, bs_data,
$
(
this
).
attr
(
"
width
"
,
$
(
this
).
find
(
"
g
"
)[
0
].
getBoundingClientRect
().
width
);
$
(
this
).
attr
(
"
height
"
,
$
(
this
).
find
(
"
g
"
)[
0
].
getBoundingClientRect
().
height
);
});
var
bbox_svg
=
handler
.
data
.
det_ui
.
find
(
"
svg#det_fam_tree
"
)[
0
].
getBBox
();
handler
.
data
.
det_ui
.
find
(
"
svg#det_fam_tree
"
).
attr
({
"
height
"
:
bbox_svg
.
height
+
50
,
"
width
"
:
bbox_svg
.
width
+
250
});
handler
.
stopPropagation
();
});
$
(
"
<tr>
"
).
appendTo
(
clanTab
.
find
(
"
tbody
"
))
...
...
@@ -1031,7 +1046,7 @@ BigscapeFunc.openFamDetail = function(id_fam, ids_highlighted, bs_svg, bs_data,
}
handler
.
data
.
tempG
.
setAttribute
(
'
transform
'
,
'
translate(
'
+
panLevelsHorizontal
+
'
,
'
+
panLevelsVertical
+
'
) scale(
'
+
zoomLevel
.
toFixed
(
2
)
+
'
)
'
);
}
var
panZoomTree
=
$
(
"
<div></div>
"
).
appendTo
(
treeContainer
);
var
panZoomTree
=
$
(
"
<div></div>
"
).
insertBefore
(
treeSVG
);
var
btnZoomIn
=
$
(
"
<button>+</button>
"
).
click
({
treeSVG
:
treeSVG
,
tempG
:
tempG
,
isZoomIn
:
true
},
zoomInOut
).
appendTo
(
panZoomTree
);
var
btnZoomOut
=
$
(
"
<button>-</button>
"
).
click
({
treeSVG
:
treeSVG
,
tempG
:
tempG
,
isZoomIn
:
false
},
zoomInOut
).
appendTo
(
panZoomTree
);
var
btnPanUp
=
$
(
"
<button>up</button>
"
).
click
({
treeSVG
:
treeSVG
,
tempG
:
tempG
,
direction
:
"
up
"
},
panDirection
).
appendTo
(
panZoomTree
);
...
...
@@ -1061,9 +1076,7 @@ BigscapeFunc.openFamDetail = function(id_fam, ids_highlighted, bs_svg, bs_data,
downloadLink
[
0
].
click
();
downloadLink
.
remove
();
}
var
exportTree
=
$
(
"
<div></div>
"
).
appendTo
(
treeContainer
);
var
btnExport
=
$
(
"
<button>Download SVG</button>
"
).
click
({
treeSVG
:
treeSVG
,
gcf_id
:
bs_families
[
id_fam
][
"
id
"
]},
exportSVG
).
appendTo
(
exportTree
);
var
btnExport
=
$
(
"
<button>Download SVG</button>
"
).
click
({
treeSVG
:
treeSVG
,
gcf_id
:
bs_families
[
id_fam
][
"
id
"
]},
exportSVG
).
appendTo
(
panZoomTree
);
// hide domains....*temp*
//treeSVG.find("polygon.arrower-domain").css("display", "none");
...
...
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