Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pdb-ligand-env
Manage
Activity
Members
Labels
Plan
Issues
5
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pdbe
web-components
pdb-ligand-env
Commits
b210283d
Commit
b210283d
authored
11 months ago
by
Marcelo Querino Lima Alfonso
Browse files
Options
Downloads
Patches
Plain Diff
added listening to PDB.ligHeatmap mouseover and mouseout
parent
ed3dc5fa
No related branches found
No related tags found
2 merge requests
!5
Refactored code for diplaying aggregated ligand interactions
,
!4
Added features for aggregated ligand interaction view and interactivity with heat map
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/plugin/config.ts
+3
-0
3 additions, 0 deletions
src/plugin/config.ts
src/plugin/depiction.ts
+4
-5
4 additions, 5 deletions
src/plugin/depiction.ts
src/plugin/manager.ts
+17
-2
17 additions, 2 deletions
src/plugin/manager.ts
with
24 additions
and
7 deletions
src/plugin/config.ts
+
3
−
0
View file @
b210283d
...
...
@@ -14,6 +14,9 @@ namespace Config {
export
const
molstarMouseoverEvent
:
string
=
'
PDB.molstar.mouseover
'
;
export
const
molstarMouseoutEvent
:
string
=
'
PDB.molstar.mouseout
'
;
export
const
ligandHeatmapMouseoverEvent
:
string
=
'
PDB.ligHeatmap.mouseover
'
;
export
const
ligandHeatmapMouseoutEvent
:
string
=
'
PDB.ligHeatmap.mouseout
'
;
export
const
aaTypes
=
new
Map
<
string
,
Array
<
string
>>
([
[
'
hydrophobic
'
,
new
Array
<
string
>
(
'
A
'
,
'
I
'
,
'
L
'
,
'
M
'
,
'
F
'
,
'
W
'
,
'
V
'
)],
[
'
positive
'
,
Array
<
string
>
(
'
K
'
,
'
R
'
,
'
O
'
)],
...
...
This diff is collapsed.
Click to expand it.
src/plugin/depiction.ts
+
4
−
5
View file @
b210283d
...
...
@@ -308,24 +308,23 @@ class Depiction {
/**
* Mouse enter event handler for circles around atoms
* depicting their weights
* @p
rivate
* @p
ublic
* @param {Atom} atom object
* @memebrof Depiction
*/
p
rivate
atomMouseEnterEventHandler
(
x
:
Atom
){
p
ublic
atomMouseEnterEventHandler
(
x
:
Atom
){
this
.
fireExternalAtomEvent
(
x
,
Config
.
LigandShowAtomEvent
);
}
/**
* Mouse leave event handler for circlea round atoms
* depicting their weights
* @p
rivate
* @p
ublic
* @memberof Depiction
*/
p
rivate
atomMouseLeaveEventHandler
(){
p
ublic
atomMouseLeaveEventHandler
(){
this
.
fireExternalNullEvent
(
Config
.
LigandHideAtomEvent
);
}
// #endregion
...
...
This diff is collapsed.
Click to expand it.
src/plugin/manager.ts
+
17
−
2
View file @
b210283d
...
...
@@ -79,8 +79,11 @@ class Visualization {
if
(
uiParameters
.
zoom
)
this
.
zoomHandler
=
this
.
getZoomHandler
();
document
.
addEventListener
(
Config
.
ligandHeatmapMouseoverEvent
,
e
=>
this
.
ligHeatmapMouseoverEventHandler
(
e
));
document
.
addEventListener
(
Config
.
ligandHeatmapMouseoutEvent
,
()
=>
this
.
ligHeatmapMouseoutEventHandler
());
document
.
addEventListener
(
Config
.
molstarClickEvent
,
e
=>
this
.
molstarClickEventHandler
(
e
));
document
.
addEventListener
(
Config
.
molstarMouseoverEvent
,
e
=>
this
.
molstarClickEventHandler
(
e
));
document
.
addEventListener
(
Config
.
molstarMouseoverEvent
,
e
=>
this
.
molstarClickEventHandler
(
e
));
document
.
addEventListener
(
Config
.
molstarMouseoutEvent
,
()
=>
this
.
molstarMouseoutEventHandler
());
d3
.
select
(
this
.
parent
).
on
(
'
resize
'
,
()
=>
this
.
resize
());
...
...
@@ -106,7 +109,7 @@ class Visualization {
private
molstarClickEventHandler
(
e
:
any
)
{
if
(
this
.
fullScreen
)
return
;
let
hash
=
`
${
e
.
eventData
.
auth_asym_id
}${
e
.
eventData
.
auth_seq_id
}${
e
.
eventData
.
ins_code
}
`
;
let
hash
=
`
${
e
.
eventData
.
auth_asym_id
}${
e
.
eventData
.
auth_seq_id
}${
e
.
eventData
.
ins_code
}
`
;
this
.
nodes
?.
each
((
node
:
Model
.
InteractionNode
,
index
:
number
,
group
:
any
)
=>
{
this
.
nodeDim
(
node
,
index
,
group
);
...
...
@@ -120,6 +123,18 @@ class Visualization {
}
private
ligHeatmapMouseoverEventHandler
(
e
:
any
)
{
const
atomName
=
e
.
detail
.
name
;
// CustomEvent
const
atom
=
this
.
depiction
.
atoms
.
filter
(
x
=>
x
.
value
>
0
&&
x
.
name
===
atomName
);
if
(
atom
.
length
>
0
)
{
this
.
depiction
.
atomMouseEnterEventHandler
(
atom
[
0
]);
}
}
private
ligHeatmapMouseoutEventHandler
()
{
this
.
depiction
.
atomMouseLeaveEventHandler
();
}
/**
* Handles mouse leave molstar event. Removes interaction node highlight
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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