Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
trustworthiness-visualization
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
Stephen Mayhew
trustworthiness-visualization
Commits
5cb12f9f
There was an error fetching the commit references. Please try again later.
Commit
5cb12f9f
authored
10 years ago
by
Stephen Mayhew
Browse files
Options
Downloads
Patches
Plain Diff
Added spinner
parent
8a9e02ac
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
css/style.css
+1
-0
1 addition, 0 deletions
css/style.css
index.html
+1
-1
1 addition, 1 deletion
index.html
js/vis_common.js
+6
-2
6 additions, 2 deletions
js/vis_common.js
vis.js
+20
-11
20 additions, 11 deletions
vis.js
with
28 additions
and
14 deletions
css/style.css
+
1
−
0
View file @
5cb12f9f
...
...
@@ -140,4 +140,5 @@ p.color:hover {
position
:
fixed
;
top
:
50%
;
left
:
50%
;
z-index
:
100
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
index.html
+
1
−
1
View file @
5cb12f9f
...
...
@@ -114,7 +114,7 @@
<!-- </div> -->
<div
id=
"spinnerdiv"
><i
id=
"spinner"
class=
"fa fa-
spinner
fa-5x"
></i></div>
<div
id=
"spinnerdiv"
><i
id=
"spinner"
class=
"fa fa-
circle-o-notch
fa-5x"
></i></div>
...
...
This diff is collapsed.
Click to expand it.
js/vis_common.js
+
6
−
2
View file @
5cb12f9f
...
...
@@ -2,12 +2,16 @@
* Created by stephen on 3/20/15.
*/
function
startSpinner
()
{
//$("#spinnerdiv").fadeIn();
console
.
log
(
"
Starting spinner...
"
)
$
(
"
#spinnerdiv
"
).
show
();
$
(
"
#spinner
"
).
addClass
(
"
fa-spin
"
);
}
function
stopSpinner
()
{
//$("#spinnerdiv").fadeOut();
console
.
log
(
"
Stopping spinner...
"
)
$
(
"
#spinnerdiv
"
).
hide
();
$
(
"
#spinner
"
).
removeClass
(
"
fa-spin
"
);
}
...
...
This diff is collapsed.
Click to expand it.
vis.js
+
20
−
11
View file @
5cb12f9f
...
...
@@ -5,6 +5,9 @@ $( document ).ready(function() {
// This makes the info box draggable.
$
(
"
.info
"
).
draggable
();
// to make the div hide
stopSpinner
();
$
(
"
#selectDataBox
"
).
change
(
updateSVG
);
// This populates the data box from the filelist.json file
...
...
@@ -53,8 +56,6 @@ function updateSVG() {
var
strVal
=
e
.
options
[
e
.
selectedIndex
].
value
;
console
.
log
(
strVal
);
var
filename
;
if
(
strVal
===
"
dummy
"
){
return
;
...
...
@@ -180,28 +181,24 @@ function updateSVG() {
function
transitionMultiples
()
{
$
(
"
#upbutton
"
).
hide
(
500
);
$
(
"
#downbutton
"
).
show
(
500
);
var
t
=
svg
;
//.transition().duration(750),
g
=
t
.
selectAll
(
"
.system
"
).
attr
(
"
transform
"
,
function
(
d
,
i
)
{
return
"
translate(0,
"
+
(
-
y0
(
syslist
[
syslist
.
length
-
1
-
i
]))
+
"
)
"
;
});
var
g
=
t
.
selectAll
(
"
.system
"
).
attr
(
"
transform
"
,
function
(
d
,
i
)
{
return
"
translate(0,
"
+
(
-
y0
(
syslist
[
syslist
.
length
-
1
-
i
]))
+
"
)
"
;
});
g
.
selectAll
(
"
rect
"
).
attr
(
"
y
"
,
function
(
d
)
{
return
y1
(
d
.
y
);
});
d3
.
selectAll
(
"
.rule
"
).
style
(
"
visibility
"
,
"
hidden
"
);
}
function
transitionStacked
()
{
$
(
"
#downbutton
"
).
hide
(
500
);
$
(
"
#upbutton
"
).
show
(
500
);
var
t
=
svg
;
//.transition().duration(750),
g
=
t
.
selectAll
(
"
.system
"
).
attr
(
"
transform
"
,
"
translate(0,0)
"
);
var
g
=
t
.
selectAll
(
"
.system
"
).
attr
(
"
transform
"
,
"
translate(0,0)
"
);
g
.
selectAll
(
"
rect
"
).
attr
(
"
y
"
,
function
(
d
)
{
return
-
rectheight
*
(
d
.
y0
)
-
rectheight
*
(
d
.
y
);
});
d3
.
selectAll
(
"
.rule
"
).
style
(
"
visibility
"
,
"
visible
"
);
}
// this is called when the sort button is pressed.
function
update
(){
startSpinner
();
d3
.
selectAll
(
"
.vertrule
"
).
remove
();
...
...
@@ -257,13 +254,20 @@ function updateSVG() {
//.transition().duration(750) // commented out because it takes too much memory.
.
attr
(
"
x
"
,
function
(
d
)
{
return
x
(
d
.
x
)
}
);
stopSpinner
();
}
$
(
"
#sortbutton
"
).
on
(
"
click
"
,
update
);
$
(
"
#sortbutton
"
).
off
().
on
(
"
click
"
,
update
);
$
(
"
#togglebutton
"
).
on
(
"
click
"
,
$
(
"
#togglebutton
"
).
html
(
"
<i class=
\"
fa fa-th
\"
></i> To Matrix
"
);
$
(
"
#togglebutton
"
).
off
().
on
(
"
click
"
,
function
()
{
startSpinner
();
var
t
=
$
(
this
).
text
();
console
.
log
(
t
);
if
(
t
.
indexOf
(
"
Matrix
"
)
>
-
1
)
{
transitionMultiples
();
$
(
this
).
html
(
"
<i class=
\"
fa fa-bar-chart
\"
></i> To Histogram
"
);
...
...
@@ -271,6 +275,8 @@ function updateSVG() {
transitionStacked
();
$
(
this
).
html
(
"
<i class=
\"
fa fa-th
\"
></i> To Matrix
"
);
}
stopSpinner
();
$
(
this
).
blur
();
});
stopSpinner
();
...
...
@@ -278,6 +284,9 @@ function updateSVG() {
$
(
"
#sortbutton
"
).
prop
(
"
disabled
"
,
false
);
$
(
"
#togglebutton
"
).
prop
(
"
disabled
"
,
false
);
});
}
// get the indices for the line numbers
...
...
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