react-msaview 3.1.9 → 3.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/index.js +30 -44
- package/dist/components/Loading.js +1 -1
- package/dist/components/Loading.js.map +1 -1
- package/dist/components/SequenceTextArea.js +1 -0
- package/dist/components/SequenceTextArea.js.map +1 -1
- package/dist/components/dialogs/SettingsDialog.js +3 -3
- package/dist/components/dialogs/SettingsDialog.js.map +1 -1
- package/dist/components/msa/MSACanvas.js +6 -8
- package/dist/components/msa/MSACanvas.js.map +1 -1
- package/dist/components/tree/TreeCanvas.js +4 -6
- package/dist/components/tree/TreeCanvas.js.map +1 -1
- package/dist/model.d.ts +26 -66
- package/dist/model.js +1 -1
- package/dist/model.js.map +1 -1
- package/dist/parsers/StockholmMSA.d.ts +2 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +1 -4
- package/src/components/Loading.tsx +7 -5
- package/src/components/SequenceTextArea.tsx +1 -0
- package/src/components/dialogs/SettingsDialog.tsx +4 -4
- package/src/components/msa/MSACanvas.tsx +8 -10
- package/src/components/tree/TreeCanvas.tsx +4 -6
- package/src/model.ts +2 -2
- package/src/version.ts +1 -1
|
@@ -82,7 +82,7 @@ const TreeSettings = observer(function TreeSettings({
|
|
|
82
82
|
onChange={() => model.setDrawLabels(!drawLabels)}
|
|
83
83
|
label="Draw labels"
|
|
84
84
|
/>
|
|
85
|
-
{
|
|
85
|
+
{noTree ? null : (
|
|
86
86
|
<div>
|
|
87
87
|
<Checkbox2
|
|
88
88
|
checked={treeWidthMatchesArea}
|
|
@@ -91,7 +91,7 @@ const TreeSettings = observer(function TreeSettings({
|
|
|
91
91
|
}
|
|
92
92
|
label="Make tree width fit to tree area?"
|
|
93
93
|
/>
|
|
94
|
-
{
|
|
94
|
+
{treeWidthMatchesArea ? null : (
|
|
95
95
|
<div className={classes.flex}>
|
|
96
96
|
<Typography>Tree width ({treeWidth}px)</Typography>
|
|
97
97
|
<Slider
|
|
@@ -102,9 +102,9 @@ const TreeSettings = observer(function TreeSettings({
|
|
|
102
102
|
onChange={(_, val) => model.setTreeWidth(val as number)}
|
|
103
103
|
/>
|
|
104
104
|
</div>
|
|
105
|
-
)
|
|
105
|
+
)}
|
|
106
106
|
</div>
|
|
107
|
-
)
|
|
107
|
+
)}
|
|
108
108
|
</div>
|
|
109
109
|
)
|
|
110
110
|
})
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState, useRef } from 'react'
|
|
2
2
|
import { observer } from 'mobx-react'
|
|
3
|
-
import normalizeWheel from 'normalize-wheel'
|
|
4
3
|
|
|
5
4
|
// locals
|
|
6
5
|
import { MsaViewModel } from '../../model'
|
|
@@ -23,10 +22,9 @@ const MSACanvas = observer(function ({ model }: { model: MsaViewModel }) {
|
|
|
23
22
|
if (!curr) {
|
|
24
23
|
return
|
|
25
24
|
}
|
|
26
|
-
function onWheel(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
deltaY.current += event.pixelY
|
|
25
|
+
function onWheel(event: WheelEvent) {
|
|
26
|
+
deltaX.current += event.deltaX
|
|
27
|
+
deltaY.current += event.deltaY
|
|
30
28
|
|
|
31
29
|
if (!scheduled.current) {
|
|
32
30
|
scheduled.current = true
|
|
@@ -38,8 +36,8 @@ const MSACanvas = observer(function ({ model }: { model: MsaViewModel }) {
|
|
|
38
36
|
scheduled.current = false
|
|
39
37
|
})
|
|
40
38
|
}
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
event.preventDefault()
|
|
40
|
+
event.stopPropagation()
|
|
43
41
|
}
|
|
44
42
|
curr.addEventListener('wheel', onWheel)
|
|
45
43
|
return () => {
|
|
@@ -121,9 +119,7 @@ const MSACanvas = observer(function ({ model }: { model: MsaViewModel }) {
|
|
|
121
119
|
overflow: 'hidden',
|
|
122
120
|
}}
|
|
123
121
|
>
|
|
124
|
-
{!MSA && !msaFilehandle ? null :
|
|
125
|
-
<Loading />
|
|
126
|
-
) : (
|
|
122
|
+
{!MSA && !msaFilehandle ? null : MSA ? (
|
|
127
123
|
blocks2d.map(([bx, by]) => (
|
|
128
124
|
<MSACanvasBlock
|
|
129
125
|
key={`${bx}_${by}`}
|
|
@@ -132,6 +128,8 @@ const MSACanvas = observer(function ({ model }: { model: MsaViewModel }) {
|
|
|
132
128
|
offsetY={by}
|
|
133
129
|
/>
|
|
134
130
|
))
|
|
131
|
+
) : (
|
|
132
|
+
<Loading />
|
|
135
133
|
)}
|
|
136
134
|
</div>
|
|
137
135
|
)
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from 'react'
|
|
2
|
-
import normalizeWheel from 'normalize-wheel'
|
|
3
2
|
import { observer } from 'mobx-react'
|
|
4
3
|
|
|
5
4
|
// locals
|
|
@@ -20,9 +19,8 @@ const TreeCanvas = observer(function ({ model }: { model: MsaViewModel }) {
|
|
|
20
19
|
if (!curr) {
|
|
21
20
|
return
|
|
22
21
|
}
|
|
23
|
-
function onWheel(
|
|
24
|
-
|
|
25
|
-
deltaY.current += event.pixelY
|
|
22
|
+
function onWheel(event: WheelEvent) {
|
|
23
|
+
deltaY.current += event.deltaY
|
|
26
24
|
|
|
27
25
|
if (!scheduled.current) {
|
|
28
26
|
scheduled.current = true
|
|
@@ -32,8 +30,8 @@ const TreeCanvas = observer(function ({ model }: { model: MsaViewModel }) {
|
|
|
32
30
|
scheduled.current = false
|
|
33
31
|
})
|
|
34
32
|
}
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
event.preventDefault()
|
|
34
|
+
event.stopPropagation()
|
|
37
35
|
}
|
|
38
36
|
curr.addEventListener('wheel', onWheel)
|
|
39
37
|
return () => {
|
package/src/model.ts
CHANGED
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
loadInterProScanResults,
|
|
59
59
|
} from './launchInterProScan'
|
|
60
60
|
|
|
61
|
-
interface Accession {
|
|
61
|
+
export interface Accession {
|
|
62
62
|
accession: string
|
|
63
63
|
name: string
|
|
64
64
|
description: string
|
|
@@ -580,7 +580,7 @@ function stateModelFactory() {
|
|
|
580
580
|
*/
|
|
581
581
|
get mouseOverRowName() {
|
|
582
582
|
const { mouseRow } = self
|
|
583
|
-
return mouseRow
|
|
583
|
+
return mouseRow === undefined ? undefined : this.rowNames[mouseRow]
|
|
584
584
|
},
|
|
585
585
|
|
|
586
586
|
/**
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '3.1.
|
|
1
|
+
export const version = '3.1.11'
|