Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
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
Grégoire Locqueville
purescript-gargantext
Commits
2e36c381
Verified
Commit
2e36c381
authored
Mar 10, 2023
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[sigma.js] screenshot small code pretifying
To make it explicit that all canvases are ok.
parent
4eece006
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
sigmajs-screenshot.js
src/external-deps/sigmajs-screenshot.js
+13
-13
No files found.
src/external-deps/sigmajs-screenshot.js
View file @
2e36c381
...
...
@@ -116,13 +116,13 @@ function debugSnapshot(data) {
export
function
takeScreenshot
(
sigma
)
{
let
c
=
sigma
.
container
;
let
edges
=
c
.
getElementsByClassName
(
'sigma-edges'
)[
0
];
let
edges
=
c
.
getElementsByClassName
(
'sigma-edges'
)[
0
];
let
edgeLabels
=
c
.
getElementsByClassName
(
'sigma-edgeLabels'
)[
0
];
let
nodes
=
c
.
getElementsByClassName
(
'sigma-nodes'
)[
0
];
let
labels
=
c
.
getElementsByClassName
(
'sigma-labels'
)[
0
];
let
hovers
=
c
.
getElementsByClassName
(
'sigma-hovers'
)[
0
];
let
nodes
=
c
.
getElementsByClassName
(
'sigma-nodes'
)[
0
];
let
labels
=
c
.
getElementsByClassName
(
'sigma-labels'
)[
0
];
let
hovers
=
c
.
getElementsByClassName
(
'sigma-hovers'
)[
0
];
let
hoverNodes
=
c
.
getElementsByClassName
(
'sigma-hoverNodes'
)[
0
];
let
mouse
=
c
.
getElementsByClassName
(
'sigma-mouse'
)[
0
];
let
mouse
=
c
.
getElementsByClassName
(
'sigma-mouse'
)[
0
];
// temporary canvas element onto which we will draw
let
tmp
=
document
.
createElement
(
'canvas'
);
...
...
@@ -172,14 +172,14 @@ export function takeScreenshot(sigma) {
src
};
};
const
uniforms
=
{
u_edges
:
twgl
.
createTexture
(
gl
,
texParams
(
edges
)),
u_edgeLabels
:
twgl
.
createTexture
(
gl
,
texParams
(
edgeLabels
)),
u_nodes
:
twgl
.
createTexture
(
gl
,
texParams
(
nodes
)),
u_labels
:
twgl
.
createTexture
(
gl
,
texParams
(
labels
)),
u_hovers
:
twgl
.
createTexture
(
gl
,
texParams
(
hovers
)),
u_hoverNodes
:
twgl
.
createTexture
(
gl
,
texParams
(
hoverNodes
)),
u_mouse
:
twgl
.
createTexture
(
gl
,
texParams
(
mouse
)),
u_resolution
:
[
gl
.
canvas
.
width
,
gl
.
canvas
.
height
]
u_edges
:
twgl
.
createTexture
(
gl
,
texParams
(
edges
)),
u_edgeLabels
:
twgl
.
createTexture
(
gl
,
texParams
(
edgeLabels
)),
u_nodes
:
twgl
.
createTexture
(
gl
,
texParams
(
nodes
)),
u_labels
:
twgl
.
createTexture
(
gl
,
texParams
(
labels
)),
u_hovers
:
twgl
.
createTexture
(
gl
,
texParams
(
hovers
)),
u_hoverNodes
:
twgl
.
createTexture
(
gl
,
texParams
(
hoverNodes
)),
u_mouse
:
twgl
.
createTexture
(
gl
,
texParams
(
mouse
)),
u_resolution
:
[
gl
.
canvas
.
width
,
gl
.
canvas
.
height
]
};
gl
.
useProgram
(
programInfo
.
program
);
...
...
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