Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Molstar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michal Malý
Molstar
Commits
b6273205
Commit
b6273205
authored
5 years ago
by
Alexander Rose
Browse files
Options
Downloads
Patches
Plain Diff
removed duplicate type
parent
b38193aa
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/mol-plugin/ui/sequence/sequence.tsx
+3
-3
3 additions, 3 deletions
src/mol-plugin/ui/sequence/sequence.tsx
src/mol-util/input/input-observer.ts
+1
-2
1 addition, 2 deletions
src/mol-util/input/input-observer.ts
with
4 additions
and
5 deletions
src/mol-plugin/ui/sequence/sequence.tsx
+
3
−
3
View file @
b6273205
...
@@ -9,7 +9,7 @@ import * as React from 'react'
...
@@ -9,7 +9,7 @@ import * as React from 'react'
import
{
PluginUIComponent
}
from
'
../base
'
;
import
{
PluginUIComponent
}
from
'
../base
'
;
import
{
Interactivity
}
from
'
../../util/interactivity
'
;
import
{
Interactivity
}
from
'
../../util/interactivity
'
;
import
{
MarkerAction
}
from
'
../../../mol-util/marker-action
'
;
import
{
MarkerAction
}
from
'
../../../mol-util/marker-action
'
;
import
{
ButtonsType
,
ModifiersKeys
,
getButtons
,
getModifiers
,
MouseModifiers
}
from
'
../../../mol-util/input/input-observer
'
;
import
{
ButtonsType
,
ModifiersKeys
,
getButtons
,
getModifiers
}
from
'
../../../mol-util/input/input-observer
'
;
import
{
SequenceWrapper
}
from
'
./wrapper
'
;
import
{
SequenceWrapper
}
from
'
./wrapper
'
;
import
{
StructureElement
}
from
'
../../../mol-model/structure
'
;
import
{
StructureElement
}
from
'
../../../mol-model/structure
'
;
import
{
Subject
}
from
'
rxjs
'
;
import
{
Subject
}
from
'
rxjs
'
;
...
@@ -22,7 +22,7 @@ type SequenceProps = { sequenceWrapper: SequenceWrapper.Any }
...
@@ -22,7 +22,7 @@ type SequenceProps = { sequenceWrapper: SequenceWrapper.Any }
export
class
Sequence
<
P
extends
SequenceProps
>
extends
PluginUIComponent
<
P
>
{
export
class
Sequence
<
P
extends
SequenceProps
>
extends
PluginUIComponent
<
P
>
{
private
parentDiv
=
React
.
createRef
<
HTMLDivElement
>
();
private
parentDiv
=
React
.
createRef
<
HTMLDivElement
>
();
private
lastMouseOverSeqIdx
=
-
1
;
private
lastMouseOverSeqIdx
=
-
1
;
private
highlightQueue
=
new
Subject
<
{
seqIdx
:
number
,
buttons
:
number
,
modifiers
:
Mouse
Modifiers
}
>
();
private
highlightQueue
=
new
Subject
<
{
seqIdx
:
number
,
buttons
:
number
,
modifiers
:
Modifiers
Keys
}
>
();
private
lociHighlightProvider
=
(
loci
:
Interactivity
.
Loci
,
action
:
MarkerAction
)
=>
{
private
lociHighlightProvider
=
(
loci
:
Interactivity
.
Loci
,
action
:
MarkerAction
)
=>
{
const
changed
=
this
.
props
.
sequenceWrapper
.
markResidue
(
loci
.
loci
,
action
)
const
changed
=
this
.
props
.
sequenceWrapper
.
markResidue
(
loci
.
loci
,
action
)
...
@@ -38,7 +38,7 @@ export class Sequence<P extends SequenceProps> extends PluginUIComponent<P> {
...
@@ -38,7 +38,7 @@ export class Sequence<P extends SequenceProps> extends PluginUIComponent<P> {
this
.
plugin
.
interactivity
.
lociHighlights
.
addProvider
(
this
.
lociHighlightProvider
)
this
.
plugin
.
interactivity
.
lociHighlights
.
addProvider
(
this
.
lociHighlightProvider
)
this
.
plugin
.
interactivity
.
lociSelects
.
addProvider
(
this
.
lociSelectionProvider
)
this
.
plugin
.
interactivity
.
lociSelects
.
addProvider
(
this
.
lociSelectionProvider
)
this
.
subscribe
(
debounceTime
<
{
seqIdx
:
number
,
buttons
:
number
,
modifiers
:
Mouse
Modifiers
}
>
(
15
)(
this
.
highlightQueue
),
(
e
)
=>
{
this
.
subscribe
(
debounceTime
<
{
seqIdx
:
number
,
buttons
:
number
,
modifiers
:
Modifiers
Keys
}
>
(
15
)(
this
.
highlightQueue
),
(
e
)
=>
{
this
.
hover
(
e
.
seqIdx
<
0
?
void
0
:
e
.
seqIdx
,
e
.
buttons
,
e
.
modifiers
);
this
.
hover
(
e
.
seqIdx
<
0
?
void
0
:
e
.
seqIdx
,
e
.
buttons
,
e
.
modifiers
);
});
});
}
}
...
...
This diff is collapsed.
Click to expand it.
src/mol-util/input/input-observer.ts
+
1
−
2
View file @
b6273205
...
@@ -37,8 +37,7 @@ export function getButtons(event: MouseEvent | Touch) {
...
@@ -37,8 +37,7 @@ export function getButtons(event: MouseEvent | Touch) {
return
0
return
0
}
}
export
type
MouseModifiers
=
{
alt
:
boolean
,
shift
:
boolean
,
control
:
boolean
,
meta
:
boolean
}
export
function
getModifiers
(
event
:
MouseEvent
|
Touch
):
ModifiersKeys
{
export
function
getModifiers
(
event
:
MouseEvent
|
Touch
):
MouseModifiers
{
return
{
return
{
alt
:
'
altKey
'
in
event
?
event
.
altKey
:
false
,
alt
:
'
altKey
'
in
event
?
event
.
altKey
:
false
,
shift
:
'
shiftKey
'
in
event
?
event
.
shiftKey
:
false
,
shift
:
'
shiftKey
'
in
event
?
event
.
shiftKey
:
false
,
...
...
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