Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clinicaltrials
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
david Chavalarias
clinicaltrials
Commits
651b18db
Commit
651b18db
authored
Sep 18, 2014
by
PkSM3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
snapshot
parent
a9a97032
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
50 deletions
+49
-50
explorerjs.html
explorerjs.html
+8
-5
camera.png
img/camera.png
+0
-0
methods.js
tinawebJS/js/methods.js
+41
-45
No files found.
explorerjs.html
View file @
651b18db
...
@@ -202,8 +202,8 @@
...
@@ -202,8 +202,8 @@
<li>
<li>
<a
href=
"#"
id=
"s
tatsicon"
onclick=
"$('#statsmodal').modal('show'
);"
>
<a
href=
"#"
id=
"s
napicon"
onclick=
"saveGraphIMG(
);"
>
<img
title=
"
Network Stats"
width=
"34px"
src=
"img/stats
.png"
></img>
<img
title=
"
Take a photo!"
width=
"34px"
src=
"img/camera
.png"
></img>
</a>
</a>
</li>
</li>
...
@@ -309,6 +309,7 @@
...
@@ -309,6 +309,7 @@
</div>
</div>
<div
id=
"modalloader"
class=
"modal fade"
>
<div
id=
"modalloader"
class=
"modal fade"
>
<div
id=
"loader"
>
<div
id=
"loader"
>
<img
src=
"img/loader.gif"
></img>
<img
src=
"img/loader.gif"
></img>
...
@@ -343,7 +344,7 @@
...
@@ -343,7 +344,7 @@
<script
src=
"jquery/jquery-ui.js"
type=
"text/javascript"
></script>
<script
src=
"jquery/jquery-ui.js"
type=
"text/javascript"
></script>
<script
src=
"libs/jquery/jquery.ba-dotimeout.min.js"
type=
"text/javascript"
></script>
<script
src=
"libs/jquery/jquery.ba-dotimeout.min.js"
type=
"text/javascript"
></script>
<script
src=
"libs/jquery/jquery.mousewheel.min.js"
type=
"text/javascript"
></script>
<script
src=
"libs/jquery/jquery.mousewheel.min.js"
type=
"text/javascript"
></script>
<
script
src=
"libs/jquery/jquery.tokeninput.js"
type=
"text/javascript"
></script
>
<
!--<script src="libs/jquery/jquery.tokeninput.js" type="text/javascript"></script>--
>
<script
type=
"text/javascript"
src=
"libs/freshslider.1.0.js"
></script>
<script
type=
"text/javascript"
src=
"libs/freshslider.1.0.js"
></script>
<!--source: http://www.jqueryscript.net/slider/Simple-Nice-jQuery-Value-Range-Slider-Plugin-Fresh-Slider.html-->
<!--source: http://www.jqueryscript.net/slider/Simple-Nice-jQuery-Value-Range-Slider-Plugin-Fresh-Slider.html-->
...
@@ -361,8 +362,10 @@
...
@@ -361,8 +362,10 @@
<script
src=
"geomap2/js/countries_iso3166.js"
charset=
"utf-8"
></script>
<script
src=
"geomap2/js/countries_iso3166.js"
charset=
"utf-8"
></script>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"geomap2/css/geo.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"geomap2/css/geo.css"
/>
<!-- <script src="tinawebJS/js/canvas2image/base64.js" type="text/javascript"></script>-->
<!--
<!-- <script src="tinawebJS/js/canvas2image/canvas2image.js" type="text/javascript"></script>-->
<script src="tinawebJS/js/canvas2image/base64.js" type="text/javascript"></script>
<script src="tinawebJS/js/canvas2image/canvas2image.js" type="text/javascript"></script>
-->
<script
src=
"tinawebJS/js/sigma.min.js"
type=
"text/javascript"
language=
"javascript"
></script>
<script
src=
"tinawebJS/js/sigma.min.js"
type=
"text/javascript"
language=
"javascript"
></script>
...
...
img/camera.png
0 → 100644
View file @
651b18db
64.5 KB
tinawebJS/js/methods.js
View file @
651b18db
...
@@ -1793,7 +1793,6 @@ function saveGraph() {
...
@@ -1793,7 +1793,6 @@ function saveGraph() {
}
}
$
(
"#closesavemodal"
).
click
();
$
(
"#closesavemodal"
).
click
();
}
}
function
saveGEXF
(
nodes
,
edges
,
atts
){
function
saveGEXF
(
nodes
,
edges
,
atts
){
...
@@ -1841,56 +1840,53 @@ function saveGEXF(nodes,edges,atts){
...
@@ -1841,56 +1840,53 @@ function saveGEXF(nodes,edges,atts){
newWindow
=
window
.
open
(
uriContent
,
'neuesDokument'
);
newWindow
=
window
.
open
(
uriContent
,
'neuesDokument'
);
}
}
function
savePNG
(){
function
saveGraphIMG
(){
$
(
"#PhotoGraph"
).
click
(
function
(){
//canvas=partialGraph._core.domElements.nodes;
var
nodesCtx
=
partialGraph
.
_core
.
domElements
.
nodes
;
/*
var edgesCtx = document.getElementById("sigma_edges_1").getContext('2d');
var edgesImg = edgesCtx.getImageData(0, 0, document.getElementById("sigma_edges_1").width, document.getElementById("sigma_edges_1").height)
nodesCtx.putImageData(edgesImg,0,0);
var
strDownloadMime
=
"image/octet-stream"
var
nodesDiv
=
partialGraph
.
_core
.
domElements
.
nodes
;
var
nodesCtx
=
nodesDiv
.
getContext
(
"2d"
);
var
edgesDiv
=
partialGraph
.
_core
.
domElements
.
edges
;
var
edgesCtx
=
edgesDiv
.
getContext
(
"2d"
);
var
labelsDiv
=
partialGraph
.
_core
.
domElements
.
labels
;
var
labelsCtx
=
labelsDiv
.
getContext
(
"2d"
);
nodesCtx
.
drawImage
(
labelsDiv
,
0
,
0
);
edgesCtx
.
drawImage
(
nodesDiv
,
0
,
0
);
var
strData
=
edgesDiv
.
toDataURL
(
"image/png"
);
document
.
location
.
href
=
strData
.
replace
(
"image/png"
,
strDownloadMime
)
}
function
testSave
(){
//ctx.drawImage(partialGraph._core.domElements.edges,0,0)
var
strDownloadMime
=
"image/octet-stream"
//var oCanvas = ctx;
*/
//div = document.getElementById("sigma_nodes_1").getContext('2d');
//ctx = div.getContext("2d");
//oCanvas.drawImage(partialGraph._core.domElements.edges,0,0);
Canvas2Image
.
saveAsPNG
(
nodesCtx
);
/*
var
nodesDiv
=
partialGraph
.
_core
.
domElements
.
nodes
;
Canvas2Image.saveAsJPEG(oCanvas); // will prompt the user to save the image as JPEG.
var
nodesCtx
=
nodesDiv
.
getContext
(
"2d"
);
// Only supported by Firefox.
var
edgesDiv
=
partialGraph
.
_core
.
domElements
.
edges
;
Canvas2Image.saveAsBMP(oCanvas); // will prompt the user to save the image as BMP.
var
edgesCtx
=
edgesDiv
.
getContext
(
"2d"
);
var
labelsDiv
=
partialGraph
.
_core
.
domElements
.
labels
;
// returns an <img> element containing the converted PNG image
var
labelsCtx
=
labelsDiv
.
getContext
(
"2d"
);
var oImgPNG = Canvas2Image.saveAsPNG(oCanvas, true);
// returns an <img> element containing the converted JPEG image (Only supported by Firefox)
nodesCtx
.
drawImage
(
labelsDiv
,
0
,
0
);
var oImgJPEG = Canvas2Image.saveAsJPEG(oCanvas, true);
edgesCtx
.
drawImage
(
nodesDiv
,
0
,
0
);
// returns an <img> element containing the converted BMP image
var
strData
=
edgesDiv
.
toDataURL
(
"image/png"
);
var oImgBMP = Canvas2Image.saveAsBMP(oCanvas, true);
pr
(
strData
)
// document.location.href = strData.replace("image/png", strDownloadMime)
// all the functions also takes width and height arguments.
// These can be used to scale the resulting image:
// saves a PNG image scaled to 100x100
Canvas2Image.saveAsPNG(oCanvas, false, 100, 100);
*/
});
}
}
//obsolete
//obsolete
function
getSwitchButton
(){
function
getSwitchButton
(){
return
document
.
getElementById
(
"switchbutton"
).
src
;
return
document
.
getElementById
(
"switchbutton"
).
src
;
...
...
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