Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
UniProt
Front End
QuickGoFE
Commits
65ff6824
Unverified
Commit
65ff6824
authored
Feb 22, 2021
by
Mahdi
Committed by
GitHub
Feb 22, 2021
Browse files
Merge pull request #202 from ebi-uniprot/chart-options-input-field
with dropdown list to multiply chart size
parents
a15a31be
b93ee45d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
4 deletions
+35
-4
app/directives/chart.html
app/directives/chart.html
+8
-0
app/directives/chart.js
app/directives/chart.js
+27
-4
No files found.
app/directives/chart.html
View file @
65ff6824
...
...
@@ -12,6 +12,14 @@
<label>
<input
type=
"checkbox"
ng-model=
"$parent.showIds"
>
Show Ids
</label>
<label>
Chart size
<select
ng-options=
"item as item.name for item in multiplyChartSizeItems"
ng-model=
"multiplyChartSizeSelected"
ng-change=
"multiplyChartSize(multiplyChartSizeSelected)"
ng-init=
"item=multiplyChartSizeItems[0]"
>
</select>
</label>
<label>
Term box width
<input
type=
"number"
ng-model=
"$parent.termBoxWidth"
>
</label>
...
...
app/directives/chart.js
View file @
65ff6824
...
...
@@ -12,17 +12,40 @@ angular
link
:
function
(
scope
)
{
scope
.
showKey
=
true
;
scope
.
showIds
=
true
;
scope
.
termBoxWidth
=
85
;
scope
.
termBoxHeight
=
55
;
scope
.
fontSize
=
11
;
scope
.
originalTermBoxWidth
=
85
;
scope
.
originalTermBoxHeight
=
55
;
scope
.
originalFontSize
=
11
;
scope
.
termBoxWidth
=
scope
.
originalTermBoxWidth
;
scope
.
termBoxHeight
=
scope
.
originalTermBoxHeight
;
scope
.
fontSize
=
scope
.
originalFontSize
;
scope
.
showSlimColours
=
false
;
scope
.
showChildren
=
false
;
var
that
=
this
;
scope
.
applyOptions
=
function
(){
scope
.
applyOptions
=
function
()
{
that
.
drawChart
(
scope
);
};
scope
.
multiplyChartSizeItems
=
[
{
name
:
"
Default - normal
"
,
value
:
1
},
{
name
:
"
2X - double
"
,
value
:
2
},
{
name
:
"
3X - triple
"
,
value
:
3
},
{
name
:
"
4X - quadruple
"
,
value
:
4
},
];
scope
.
multiplyChartSize
=
function
(
selectedItem
)
{
var
size
=
selectedItem
.
value
;
if
(
!
size
)
{
return
;
}
scope
.
termBoxWidth
=
scope
.
originalTermBoxWidth
*
size
;
scope
.
termBoxHeight
=
scope
.
originalTermBoxHeight
*
size
;
scope
.
fontSize
=
scope
.
originalFontSize
*
size
;
}
scope
.
downloadChart
=
function
()
{
if
(
!
scope
.
termBoxHeight
)
{
return
;
...
...
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