Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
medema-group
BiG-SCAPE
Commits
5b45a50a
Commit
5b45a50a
authored
Nov 15, 2018
by
Kautsar, Satria
Browse files
Family tree SVG now have proper scalable width
parent
ee49871a
Changes
1
Show whitespace changes
Inline
Side-by-side
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
...
@@ -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
(
"
width
"
,
$
(
this
).
find
(
"
g
"
)[
0
].
getBoundingClientRect
().
width
);
$
(
this
).
attr
(
"
height
"
,
$
(
this
).
find
(
"
g
"
)[
0
].
getBoundingClientRect
().
height
);
$
(
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
();
handler
.
stopPropagation
();
});
});
(
$
(
"
<li>
"
).
appendTo
(
ul
)).
append
(
aShowFamDetail
);
(
$
(
"
<li>
"
).
appendTo
(
ul
)).
append
(
aShowFamDetail
);
...
@@ -534,6 +539,11 @@ BigscapeFunc.updateDescription = function(ids, bs_svg, bs_data, bs_to_cl, bs_fam
...
@@ -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
(
"
width
"
,
$
(
this
).
find
(
"
g
"
)[
0
].
getBoundingClientRect
().
width
);
$
(
this
).
attr
(
"
height
"
,
$
(
this
).
find
(
"
g
"
)[
0
].
getBoundingClientRect
().
height
);
$
(
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
();
handler
.
stopPropagation
();
});
});
li
.
find
(
"
a.li-check
"
).
click
({
bigscape
:
bigscape
,
fam
:
bs_families
[
i
]},
function
(
handler
)
{
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,
...
@@ -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
(
"
width
"
,
$
(
this
).
find
(
"
g
"
)[
0
].
getBoundingClientRect
().
width
);
$
(
this
).
attr
(
"
height
"
,
$
(
this
).
find
(
"
g
"
)[
0
].
getBoundingClientRect
().
height
);
$
(
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
();
handler
.
stopPropagation
();
});
});
$
(
"
<tr>
"
).
appendTo
(
clanTab
.
find
(
"
tbody
"
))
$
(
"
<tr>
"
).
appendTo
(
clanTab
.
find
(
"
tbody
"
))
...
@@ -1031,7 +1046,7 @@ BigscapeFunc.openFamDetail = function(id_fam, ids_highlighted, bs_svg, bs_data,
...
@@ -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
)
+
'
)
'
);
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
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
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
);
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,
...
@@ -1061,9 +1076,7 @@ BigscapeFunc.openFamDetail = function(id_fam, ids_highlighted, bs_svg, bs_data,
downloadLink
[
0
].
click
();
downloadLink
[
0
].
click
();
downloadLink
.
remove
();
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
(
panZoomTree
);
var
btnExport
=
$
(
"
<button>Download SVG</button>
"
).
click
({
treeSVG
:
treeSVG
,
gcf_id
:
bs_families
[
id_fam
][
"
id
"
]},
exportSVG
).
appendTo
(
exportTree
);
// hide domains....*temp*
// hide domains....*temp*
//treeSVG.find("polygon.arrower-domain").css("display", "none");
//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