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
709944c8
Commit
709944c8
authored
5 years ago
by
Alexander Rose
Browse files
Options
Downloads
Patches
Plain Diff
typed DataLoci
parent
9341c19b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mol-model/loci.ts
+3
-3
3 additions, 3 deletions
src/mol-model/loci.ts
with
3 additions
and
3 deletions
src/mol-model/loci.ts
+
3
−
3
View file @
709944c8
...
...
@@ -32,9 +32,9 @@ export function isEmptyLoci(x?: Loci): x is EmptyLoci {
}
/** A generic data loci */
export
interface
DataLoci
{
export
interface
DataLoci
<
T
=
unknown
>
{
readonly
kind
:
'
data-loci
'
,
readonly
data
:
any
,
readonly
data
:
T
,
readonly
tag
:
string
readonly
indices
:
OrderedSet
<
number
>
}
...
...
@@ -47,7 +47,7 @@ export function areDataLociEqual(a: DataLoci, b: DataLoci) {
export
function
isDataLociEmpty
(
loci
:
DataLoci
)
{
return
OrderedSet
.
size
(
loci
.
indices
)
===
0
?
true
:
false
}
export
function
createDataLoci
(
data
:
any
,
tag
:
string
,
indices
:
OrderedSet
<
number
>
):
DataLoci
{
export
function
createDataLoci
<
T
=
unknown
>
(
data
:
T
,
tag
:
string
,
indices
:
OrderedSet
<
number
>
):
DataLoci
<
T
>
{
return
{
kind
:
'
data-loci
'
,
data
,
tag
,
indices
}
}
...
...
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