@jbrowse/plugin-wiggle 2.2.1 → 2.2.2
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/dist/LinearWiggleDisplay/components/SetColorDialog.js +3 -19
- package/dist/LinearWiggleDisplay/components/SetColorDialog.js.map +1 -1
- package/dist/LinearWiggleDisplay/models/model.d.ts +6 -1
- package/dist/LinearWiggleDisplay/models/model.js +1 -1
- package/dist/LinearWiggleDisplay/models/model.js.map +1 -1
- package/dist/MultiLinearWiggleDisplay/components/DraggableDialog.d.ts +7 -0
- package/dist/MultiLinearWiggleDisplay/components/DraggableDialog.js +43 -0
- package/dist/MultiLinearWiggleDisplay/components/DraggableDialog.js.map +1 -0
- package/dist/MultiLinearWiggleDisplay/components/SetColorDialog.js +4 -22
- package/dist/MultiLinearWiggleDisplay/components/SetColorDialog.js.map +1 -1
- package/dist/MultiLinearWiggleDisplay/models/model.js +1 -1
- package/dist/MultiLinearWiggleDisplay/models/model.js.map +1 -1
- package/dist/WiggleRendering.js +1 -1
- package/dist/WiggleRendering.js.map +1 -1
- package/dist/{LinearWiggleDisplay/components → shared}/SetMinMaxDialog.d.ts +0 -0
- package/dist/shared/SetMinMaxDialog.js +53 -0
- package/dist/shared/SetMinMaxDialog.js.map +1 -0
- package/esm/LinearWiggleDisplay/components/SetColorDialog.js +4 -17
- package/esm/LinearWiggleDisplay/components/SetColorDialog.js.map +1 -1
- package/esm/LinearWiggleDisplay/models/model.d.ts +6 -1
- package/esm/LinearWiggleDisplay/models/model.js +1 -1
- package/esm/LinearWiggleDisplay/models/model.js.map +1 -1
- package/esm/MultiLinearWiggleDisplay/components/DraggableDialog.d.ts +7 -0
- package/esm/MultiLinearWiggleDisplay/components/DraggableDialog.js +38 -0
- package/esm/MultiLinearWiggleDisplay/components/DraggableDialog.js.map +1 -0
- package/esm/MultiLinearWiggleDisplay/components/SetColorDialog.js +5 -23
- package/esm/MultiLinearWiggleDisplay/components/SetColorDialog.js.map +1 -1
- package/esm/MultiLinearWiggleDisplay/models/model.js +1 -1
- package/esm/MultiLinearWiggleDisplay/models/model.js.map +1 -1
- package/esm/WiggleRendering.js +1 -1
- package/esm/WiggleRendering.js.map +1 -1
- package/{dist/MultiLinearWiggleDisplay/components → esm/shared}/SetMinMaxDialog.d.ts +0 -0
- package/esm/shared/SetMinMaxDialog.js +27 -0
- package/esm/shared/SetMinMaxDialog.js.map +1 -0
- package/package.json +3 -3
- package/src/LinearWiggleDisplay/components/SetColorDialog.tsx +7 -27
- package/src/LinearWiggleDisplay/models/model.tsx +1 -1
- package/src/MultiLinearWiggleDisplay/components/DraggableDialog.tsx +71 -0
- package/src/MultiLinearWiggleDisplay/components/SetColorDialog.tsx +7 -41
- package/src/MultiLinearWiggleDisplay/models/model.tsx +1 -1
- package/src/WiggleRendering.tsx +1 -1
- package/src/shared/SetMinMaxDialog.tsx +88 -0
- package/dist/LinearWiggleDisplay/components/SetMinMaxDialog.js +0 -75
- package/dist/LinearWiggleDisplay/components/SetMinMaxDialog.js.map +0 -1
- package/dist/MultiLinearWiggleDisplay/components/SetMinMaxDialog.js +0 -75
- package/dist/MultiLinearWiggleDisplay/components/SetMinMaxDialog.js.map +0 -1
- package/esm/LinearWiggleDisplay/components/SetMinMaxDialog.d.ts +0 -11
- package/esm/LinearWiggleDisplay/components/SetMinMaxDialog.js +0 -46
- package/esm/LinearWiggleDisplay/components/SetMinMaxDialog.js.map +0 -1
- package/esm/MultiLinearWiggleDisplay/components/SetMinMaxDialog.d.ts +0 -11
- package/esm/MultiLinearWiggleDisplay/components/SetMinMaxDialog.js +0 -46
- package/esm/MultiLinearWiggleDisplay/components/SetMinMaxDialog.js.map +0 -1
- package/src/LinearWiggleDisplay/components/SetMinMaxDialog.tsx +0 -113
- package/src/MultiLinearWiggleDisplay/components/SetMinMaxDialog.tsx +0 -113
|
@@ -42,7 +42,7 @@ const randomColor = () =>
|
|
|
42
42
|
'#000000'.replace(/0/g, () => (~~(Math.random() * 16)).toString(16))
|
|
43
43
|
|
|
44
44
|
// lazt components
|
|
45
|
-
const SetMinMaxDlg = lazy(() => import('
|
|
45
|
+
const SetMinMaxDlg = lazy(() => import('../../shared/SetMinMaxDialog'))
|
|
46
46
|
const SetColorDlg = lazy(() => import('../components/SetColorDialog'))
|
|
47
47
|
|
|
48
48
|
// using a map because it preserves order
|
package/src/WiggleRendering.tsx
CHANGED
|
@@ -40,7 +40,7 @@ function WiggleRendering(props: {
|
|
|
40
40
|
const clientBp = region.start + bpPerPx * px
|
|
41
41
|
let featureUnderMouse
|
|
42
42
|
for (const feature of features.values()) {
|
|
43
|
-
// bpPerPx added to the end to
|
|
43
|
+
// bpPerPx added to the end to accommodate "reduced features" (one feature per px)
|
|
44
44
|
if (
|
|
45
45
|
clientBp <= feature.get('end') + bpPerPx &&
|
|
46
46
|
clientBp >= feature.get('start')
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
DialogActions,
|
|
5
|
+
DialogContent,
|
|
6
|
+
TextField,
|
|
7
|
+
Typography,
|
|
8
|
+
} from '@mui/material'
|
|
9
|
+
import { Dialog } from '@jbrowse/core/ui'
|
|
10
|
+
|
|
11
|
+
export default function SetMinMaxDlg(props: {
|
|
12
|
+
model: {
|
|
13
|
+
minScore: number
|
|
14
|
+
maxScore: number
|
|
15
|
+
scaleType: string
|
|
16
|
+
setMinScore: Function
|
|
17
|
+
setMaxScore: Function
|
|
18
|
+
}
|
|
19
|
+
handleClose: () => void
|
|
20
|
+
}) {
|
|
21
|
+
const { model, handleClose } = props
|
|
22
|
+
const { minScore, maxScore, scaleType } = model
|
|
23
|
+
|
|
24
|
+
const [min, setMin] = useState(
|
|
25
|
+
`${minScore !== Number.MIN_VALUE ? minScore : ''}`,
|
|
26
|
+
)
|
|
27
|
+
const [max, setMax] = useState(
|
|
28
|
+
`${maxScore !== Number.MAX_VALUE ? maxScore : ''}`,
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
const ok =
|
|
32
|
+
min !== '' && max !== '' && !Number.isNaN(+min) && !Number.isNaN(+max)
|
|
33
|
+
? +max > +min
|
|
34
|
+
: true
|
|
35
|
+
|
|
36
|
+
const logOk =
|
|
37
|
+
scaleType === 'log' && min !== '' && !Number.isNaN(+min) ? +min > 0 : true
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<Dialog open onClose={handleClose} title="Set min/max score for track">
|
|
41
|
+
<DialogContent>
|
|
42
|
+
<Typography>Enter min/max score: </Typography>
|
|
43
|
+
{!ok ? (
|
|
44
|
+
<Typography color="error">
|
|
45
|
+
Max is greater than or equal to min
|
|
46
|
+
</Typography>
|
|
47
|
+
) : null}
|
|
48
|
+
|
|
49
|
+
{!logOk ? (
|
|
50
|
+
<Typography color="error">
|
|
51
|
+
Min score should be greater than 0 for log scale
|
|
52
|
+
</Typography>
|
|
53
|
+
) : null}
|
|
54
|
+
|
|
55
|
+
<TextField
|
|
56
|
+
value={min}
|
|
57
|
+
onChange={event => setMin(event.target.value)}
|
|
58
|
+
placeholder="Enter min score"
|
|
59
|
+
/>
|
|
60
|
+
<TextField
|
|
61
|
+
value={max}
|
|
62
|
+
onChange={event => setMax(event.target.value)}
|
|
63
|
+
placeholder="Enter max score"
|
|
64
|
+
/>
|
|
65
|
+
</DialogContent>
|
|
66
|
+
<DialogActions>
|
|
67
|
+
<Button
|
|
68
|
+
variant="contained"
|
|
69
|
+
color="primary"
|
|
70
|
+
type="submit"
|
|
71
|
+
style={{ marginLeft: 20 }}
|
|
72
|
+
disabled={!ok}
|
|
73
|
+
onClick={() => {
|
|
74
|
+
model.setMinScore(
|
|
75
|
+
min !== '' && !Number.isNaN(+min) ? +min : undefined,
|
|
76
|
+
)
|
|
77
|
+
model.setMaxScore(
|
|
78
|
+
max !== '' && !Number.isNaN(+max) ? +max : undefined,
|
|
79
|
+
)
|
|
80
|
+
handleClose()
|
|
81
|
+
}}
|
|
82
|
+
>
|
|
83
|
+
Submit
|
|
84
|
+
</Button>
|
|
85
|
+
</DialogActions>
|
|
86
|
+
</Dialog>
|
|
87
|
+
)
|
|
88
|
+
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const react_1 = __importStar(require("react"));
|
|
30
|
-
const material_1 = require("@mui/material");
|
|
31
|
-
const mui_1 = require("tss-react/mui");
|
|
32
|
-
const Close_1 = __importDefault(require("@mui/icons-material/Close"));
|
|
33
|
-
const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
34
|
-
root: {},
|
|
35
|
-
closeButton: {
|
|
36
|
-
position: 'absolute',
|
|
37
|
-
right: theme.spacing(1),
|
|
38
|
-
top: theme.spacing(1),
|
|
39
|
-
color: theme.palette.grey[500],
|
|
40
|
-
},
|
|
41
|
-
}));
|
|
42
|
-
function SetMinMaxDlg(props) {
|
|
43
|
-
const { classes } = useStyles();
|
|
44
|
-
const { model, handleClose } = props;
|
|
45
|
-
const { minScore, maxScore, scaleType } = model;
|
|
46
|
-
const [min, setMin] = (0, react_1.useState)(`${minScore !== Number.MIN_VALUE ? minScore : ''}`);
|
|
47
|
-
const [max, setMax] = (0, react_1.useState)(`${maxScore !== Number.MAX_VALUE ? maxScore : ''}`);
|
|
48
|
-
const ok = min !== '' && max !== '' && !Number.isNaN(+min) && !Number.isNaN(+max)
|
|
49
|
-
? +max > +min
|
|
50
|
-
: true;
|
|
51
|
-
const logOk = scaleType === 'log' && min !== '' && !Number.isNaN(+min) ? +min > 0 : true;
|
|
52
|
-
return (react_1.default.createElement(material_1.Dialog, { open: true, onClose: handleClose },
|
|
53
|
-
react_1.default.createElement(material_1.DialogTitle, null,
|
|
54
|
-
"Set min/max score for track",
|
|
55
|
-
react_1.default.createElement(material_1.IconButton, { className: classes.closeButton, onClick: handleClose },
|
|
56
|
-
react_1.default.createElement(Close_1.default, null))),
|
|
57
|
-
react_1.default.createElement(material_1.DialogContent, { style: { overflowX: 'hidden' } },
|
|
58
|
-
react_1.default.createElement("div", { className: classes.root },
|
|
59
|
-
react_1.default.createElement(material_1.Typography, null, "Enter min/max score: "),
|
|
60
|
-
!ok ? (react_1.default.createElement(material_1.Typography, { color: "error" }, "Max is greater than or equal to min")) : null,
|
|
61
|
-
!logOk ? (react_1.default.createElement(material_1.Typography, { color: "error" }, "Min score should be greater than 0 for log scale")) : null,
|
|
62
|
-
react_1.default.createElement(material_1.TextField, { value: min, onChange: event => {
|
|
63
|
-
setMin(event.target.value);
|
|
64
|
-
}, placeholder: "Enter min score" }),
|
|
65
|
-
react_1.default.createElement(material_1.TextField, { value: max, onChange: event => {
|
|
66
|
-
setMax(event.target.value);
|
|
67
|
-
}, placeholder: "Enter max score" }),
|
|
68
|
-
react_1.default.createElement(material_1.Button, { variant: "contained", color: "primary", type: "submit", style: { marginLeft: 20 }, disabled: !ok, onClick: () => {
|
|
69
|
-
model.setMinScore(min !== '' && !Number.isNaN(+min) ? +min : undefined);
|
|
70
|
-
model.setMaxScore(max !== '' && !Number.isNaN(+max) ? +max : undefined);
|
|
71
|
-
handleClose();
|
|
72
|
-
} }, "Submit")))));
|
|
73
|
-
}
|
|
74
|
-
exports.default = SetMinMaxDlg;
|
|
75
|
-
//# sourceMappingURL=SetMinMaxDialog.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SetMinMaxDialog.js","sourceRoot":"","sources":["../../../src/LinearWiggleDisplay/components/SetMinMaxDialog.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAuC;AACvC,4CAQsB;AACtB,uCAA0C;AAC1C,sEAAiD;AAEjD,MAAM,SAAS,GAAG,IAAA,gBAAU,GAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACvC,IAAI,EAAE,EAAE;IACR,WAAW,EAAE;QACX,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QACvB,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QACrB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC;KAC/B;CACF,CAAC,CAAC,CAAA;AAEH,SAAwB,YAAY,CAAC,KASpC;IACC,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,EAAE,CAAA;IAC/B,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,KAAK,CAAA;IACpC,MAAM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75 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const react_1 = __importStar(require("react"));
|
|
30
|
-
const material_1 = require("@mui/material");
|
|
31
|
-
const mui_1 = require("tss-react/mui");
|
|
32
|
-
const Close_1 = __importDefault(require("@mui/icons-material/Close"));
|
|
33
|
-
const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
34
|
-
root: {},
|
|
35
|
-
closeButton: {
|
|
36
|
-
position: 'absolute',
|
|
37
|
-
right: theme.spacing(1),
|
|
38
|
-
top: theme.spacing(1),
|
|
39
|
-
color: theme.palette.grey[500],
|
|
40
|
-
},
|
|
41
|
-
}));
|
|
42
|
-
function SetMinMaxDlg(props) {
|
|
43
|
-
const { classes } = useStyles();
|
|
44
|
-
const { model, handleClose } = props;
|
|
45
|
-
const { minScore, maxScore, scaleType } = model;
|
|
46
|
-
const [min, setMin] = (0, react_1.useState)(`${minScore !== Number.MIN_VALUE ? minScore : ''}`);
|
|
47
|
-
const [max, setMax] = (0, react_1.useState)(`${maxScore !== Number.MAX_VALUE ? maxScore : ''}`);
|
|
48
|
-
const ok = min !== '' && max !== '' && !Number.isNaN(+min) && !Number.isNaN(+max)
|
|
49
|
-
? +max > +min
|
|
50
|
-
: true;
|
|
51
|
-
const logOk = scaleType === 'log' && min !== '' && !Number.isNaN(+min) ? +min > 0 : true;
|
|
52
|
-
return (react_1.default.createElement(material_1.Dialog, { open: true, onClose: handleClose },
|
|
53
|
-
react_1.default.createElement(material_1.DialogTitle, null,
|
|
54
|
-
"Set min/max score for track",
|
|
55
|
-
react_1.default.createElement(material_1.IconButton, { className: classes.closeButton, onClick: handleClose },
|
|
56
|
-
react_1.default.createElement(Close_1.default, null))),
|
|
57
|
-
react_1.default.createElement(material_1.DialogContent, { style: { overflowX: 'hidden' } },
|
|
58
|
-
react_1.default.createElement("div", { className: classes.root },
|
|
59
|
-
react_1.default.createElement(material_1.Typography, null, "Enter min/max score: "),
|
|
60
|
-
!ok ? (react_1.default.createElement(material_1.Typography, { color: "error" }, "Max is greater than or equal to min")) : null,
|
|
61
|
-
!logOk ? (react_1.default.createElement(material_1.Typography, { color: "error" }, "Min score should be greater than 0 for log scale")) : null,
|
|
62
|
-
react_1.default.createElement(material_1.TextField, { value: min, onChange: event => {
|
|
63
|
-
setMin(event.target.value);
|
|
64
|
-
}, placeholder: "Enter min score" }),
|
|
65
|
-
react_1.default.createElement(material_1.TextField, { value: max, onChange: event => {
|
|
66
|
-
setMax(event.target.value);
|
|
67
|
-
}, placeholder: "Enter max score" }),
|
|
68
|
-
react_1.default.createElement(material_1.Button, { variant: "contained", color: "primary", type: "submit", style: { marginLeft: 20 }, disabled: !ok, onClick: () => {
|
|
69
|
-
model.setMinScore(min !== '' && !Number.isNaN(+min) ? +min : undefined);
|
|
70
|
-
model.setMaxScore(max !== '' && !Number.isNaN(+max) ? +max : undefined);
|
|
71
|
-
handleClose();
|
|
72
|
-
} }, "Submit")))));
|
|
73
|
-
}
|
|
74
|
-
exports.default = SetMinMaxDlg;
|
|
75
|
-
//# sourceMappingURL=SetMinMaxDialog.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SetMinMaxDialog.js","sourceRoot":"","sources":["../../../src/MultiLinearWiggleDisplay/components/SetMinMaxDialog.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAuC;AACvC,4CAQsB;AACtB,uCAA0C;AAC1C,sEAAiD;AAEjD,MAAM,SAAS,GAAG,IAAA,gBAAU,GAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACvC,IAAI,EAAE,EAAE;IACR,WAAW,EAAE;QACX,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QACvB,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QACrB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC;KAC/B;CACF,CAAC,CAAC,CAAA;AAEH,SAAwB,YAAY,CAAC,KASpC;IACC,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,EAAE,CAAA;IAC/B,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,KAAK,CAAA;IACpC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,CAAA;IAE/C,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,IAAA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,CAAC,CAAC,CACR,8BAAC,qBAAU,IAAC,KAAK,EAAC,OAAO,uDAEZ,CACd,CAAC,CAAC,CAAC,IAAI;gBAER,8BAAC,oBAAS,IACR,KAAK,EAAE,GAAG,EACV,QAAQ,EAAE,KAAK,CAAC,EAAE;wBAChB,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;oBAC5B,CAAC,EACD,WAAW,EAAC,iBAAiB,GAC7B;gBACF,8BAAC,oBAAS,IACR,KAAK,EAAE,GAAG,EACV,QAAQ,EAAE,KAAK,CAAC,EAAE;wBAChB,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;oBAC5B,CAAC,EACD,WAAW,EAAC,iBAAiB,GAC7B;gBAEF,8BAAC,iBAAM,IACL,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,SAAS,EACf,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,EACzB,QAAQ,EAAE,CAAC,EAAE,EACb,OAAO,EAAE,GAAG,EAAE;wBACZ,KAAK,CAAC,WAAW,CACf,GAAG,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CACrD,CAAA;wBACD,KAAK,CAAC,WAAW,CACf,GAAG,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CACrD,CAAA;wBACD,WAAW,EAAE,CAAA;oBACf,CAAC,aAGM,CACL,CACQ,CACT,CACV,CAAA;AACH,CAAC;AAzFD,+BAyFC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { Button, Dialog, DialogContent, DialogTitle, IconButton, TextField, Typography, } from '@mui/material';
|
|
3
|
-
import { makeStyles } from 'tss-react/mui';
|
|
4
|
-
import CloseIcon from '@mui/icons-material/Close';
|
|
5
|
-
const useStyles = makeStyles()(theme => ({
|
|
6
|
-
root: {},
|
|
7
|
-
closeButton: {
|
|
8
|
-
position: 'absolute',
|
|
9
|
-
right: theme.spacing(1),
|
|
10
|
-
top: theme.spacing(1),
|
|
11
|
-
color: theme.palette.grey[500],
|
|
12
|
-
},
|
|
13
|
-
}));
|
|
14
|
-
export default function SetMinMaxDlg(props) {
|
|
15
|
-
const { classes } = useStyles();
|
|
16
|
-
const { model, handleClose } = props;
|
|
17
|
-
const { minScore, maxScore, scaleType } = model;
|
|
18
|
-
const [min, setMin] = useState(`${minScore !== Number.MIN_VALUE ? minScore : ''}`);
|
|
19
|
-
const [max, setMax] = useState(`${maxScore !== Number.MAX_VALUE ? maxScore : ''}`);
|
|
20
|
-
const ok = min !== '' && max !== '' && !Number.isNaN(+min) && !Number.isNaN(+max)
|
|
21
|
-
? +max > +min
|
|
22
|
-
: true;
|
|
23
|
-
const logOk = scaleType === 'log' && min !== '' && !Number.isNaN(+min) ? +min > 0 : true;
|
|
24
|
-
return (React.createElement(Dialog, { open: true, onClose: handleClose },
|
|
25
|
-
React.createElement(DialogTitle, null,
|
|
26
|
-
"Set min/max score for track",
|
|
27
|
-
React.createElement(IconButton, { className: classes.closeButton, onClick: handleClose },
|
|
28
|
-
React.createElement(CloseIcon, null))),
|
|
29
|
-
React.createElement(DialogContent, { style: { overflowX: 'hidden' } },
|
|
30
|
-
React.createElement("div", { className: classes.root },
|
|
31
|
-
React.createElement(Typography, null, "Enter min/max score: "),
|
|
32
|
-
!ok ? (React.createElement(Typography, { color: "error" }, "Max is greater than or equal to min")) : null,
|
|
33
|
-
!logOk ? (React.createElement(Typography, { color: "error" }, "Min score should be greater than 0 for log scale")) : null,
|
|
34
|
-
React.createElement(TextField, { value: min, onChange: event => {
|
|
35
|
-
setMin(event.target.value);
|
|
36
|
-
}, placeholder: "Enter min score" }),
|
|
37
|
-
React.createElement(TextField, { value: max, onChange: event => {
|
|
38
|
-
setMax(event.target.value);
|
|
39
|
-
}, placeholder: "Enter max score" }),
|
|
40
|
-
React.createElement(Button, { variant: "contained", color: "primary", type: "submit", style: { marginLeft: 20 }, disabled: !ok, onClick: () => {
|
|
41
|
-
model.setMinScore(min !== '' && !Number.isNaN(+min) ? +min : undefined);
|
|
42
|
-
model.setMaxScore(max !== '' && !Number.isNaN(+max) ? +max : undefined);
|
|
43
|
-
handleClose();
|
|
44
|
-
} }, "Submit")))));
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=SetMinMaxDialog.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SetMinMaxDialog.js","sourceRoot":"","sources":["../../../src/LinearWiggleDisplay/components/SetMinMaxDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,EACL,MAAM,EACN,MAAM,EACN,aAAa,EACb,WAAW,EACX,UAAU,EACV,SAAS,EACT,UAAU,GACX,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,SAAS,MAAM,2BAA2B,CAAA;AAEjD,MAAM,SAAS,GAAG,UAAU,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACvC,IAAI,EAAE,EAAE;IACR,WAAW,EAAE;QACX,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QACvB,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QACrB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC;KAC/B;CACF,CAAC,CAAC,CAAA;AAEH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KASpC;IACC,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,EAAE,CAAA;IAC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;AACH,CAAC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { Button, Dialog, DialogContent, DialogTitle, IconButton, TextField, Typography, } from '@mui/material';
|
|
3
|
-
import { makeStyles } from 'tss-react/mui';
|
|
4
|
-
import CloseIcon from '@mui/icons-material/Close';
|
|
5
|
-
const useStyles = makeStyles()(theme => ({
|
|
6
|
-
root: {},
|
|
7
|
-
closeButton: {
|
|
8
|
-
position: 'absolute',
|
|
9
|
-
right: theme.spacing(1),
|
|
10
|
-
top: theme.spacing(1),
|
|
11
|
-
color: theme.palette.grey[500],
|
|
12
|
-
},
|
|
13
|
-
}));
|
|
14
|
-
export default function SetMinMaxDlg(props) {
|
|
15
|
-
const { classes } = useStyles();
|
|
16
|
-
const { model, handleClose } = props;
|
|
17
|
-
const { minScore, maxScore, scaleType } = model;
|
|
18
|
-
const [min, setMin] = useState(`${minScore !== Number.MIN_VALUE ? minScore : ''}`);
|
|
19
|
-
const [max, setMax] = useState(`${maxScore !== Number.MAX_VALUE ? maxScore : ''}`);
|
|
20
|
-
const ok = min !== '' && max !== '' && !Number.isNaN(+min) && !Number.isNaN(+max)
|
|
21
|
-
? +max > +min
|
|
22
|
-
: true;
|
|
23
|
-
const logOk = scaleType === 'log' && min !== '' && !Number.isNaN(+min) ? +min > 0 : true;
|
|
24
|
-
return (React.createElement(Dialog, { open: true, onClose: handleClose },
|
|
25
|
-
React.createElement(DialogTitle, null,
|
|
26
|
-
"Set min/max score for track",
|
|
27
|
-
React.createElement(IconButton, { className: classes.closeButton, onClick: handleClose },
|
|
28
|
-
React.createElement(CloseIcon, null))),
|
|
29
|
-
React.createElement(DialogContent, { style: { overflowX: 'hidden' } },
|
|
30
|
-
React.createElement("div", { className: classes.root },
|
|
31
|
-
React.createElement(Typography, null, "Enter min/max score: "),
|
|
32
|
-
!ok ? (React.createElement(Typography, { color: "error" }, "Max is greater than or equal to min")) : null,
|
|
33
|
-
!logOk ? (React.createElement(Typography, { color: "error" }, "Min score should be greater than 0 for log scale")) : null,
|
|
34
|
-
React.createElement(TextField, { value: min, onChange: event => {
|
|
35
|
-
setMin(event.target.value);
|
|
36
|
-
}, placeholder: "Enter min score" }),
|
|
37
|
-
React.createElement(TextField, { value: max, onChange: event => {
|
|
38
|
-
setMax(event.target.value);
|
|
39
|
-
}, placeholder: "Enter max score" }),
|
|
40
|
-
React.createElement(Button, { variant: "contained", color: "primary", type: "submit", style: { marginLeft: 20 }, disabled: !ok, onClick: () => {
|
|
41
|
-
model.setMinScore(min !== '' && !Number.isNaN(+min) ? +min : undefined);
|
|
42
|
-
model.setMaxScore(max !== '' && !Number.isNaN(+max) ? +max : undefined);
|
|
43
|
-
handleClose();
|
|
44
|
-
} }, "Submit")))));
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=SetMinMaxDialog.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SetMinMaxDialog.js","sourceRoot":"","sources":["../../../src/MultiLinearWiggleDisplay/components/SetMinMaxDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,EACL,MAAM,EACN,MAAM,EACN,aAAa,EACb,WAAW,EACX,UAAU,EACV,SAAS,EACT,UAAU,GACX,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,SAAS,MAAM,2BAA2B,CAAA;AAEjD,MAAM,SAAS,GAAG,UAAU,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACvC,IAAI,EAAE,EAAE;IACR,WAAW,EAAE;QACX,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QACvB,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QACrB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC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C,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CACrD,CAAA;wBACD,WAAW,EAAE,CAAA;oBACf,CAAC,aAGM,CACL,CACQ,CACT,CACV,CAAA;AACH,CAAC"}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react'
|
|
2
|
-
import {
|
|
3
|
-
Button,
|
|
4
|
-
Dialog,
|
|
5
|
-
DialogContent,
|
|
6
|
-
DialogTitle,
|
|
7
|
-
IconButton,
|
|
8
|
-
TextField,
|
|
9
|
-
Typography,
|
|
10
|
-
} from '@mui/material'
|
|
11
|
-
import { makeStyles } from 'tss-react/mui'
|
|
12
|
-
import CloseIcon from '@mui/icons-material/Close'
|
|
13
|
-
|
|
14
|
-
const useStyles = makeStyles()(theme => ({
|
|
15
|
-
root: {},
|
|
16
|
-
closeButton: {
|
|
17
|
-
position: 'absolute',
|
|
18
|
-
right: theme.spacing(1),
|
|
19
|
-
top: theme.spacing(1),
|
|
20
|
-
color: theme.palette.grey[500],
|
|
21
|
-
},
|
|
22
|
-
}))
|
|
23
|
-
|
|
24
|
-
export default function SetMinMaxDlg(props: {
|
|
25
|
-
model: {
|
|
26
|
-
minScore: number
|
|
27
|
-
maxScore: number
|
|
28
|
-
scaleType: string
|
|
29
|
-
setMinScore: Function
|
|
30
|
-
setMaxScore: Function
|
|
31
|
-
}
|
|
32
|
-
handleClose: () => void
|
|
33
|
-
}) {
|
|
34
|
-
const { classes } = useStyles()
|
|
35
|
-
const { model, handleClose } = props
|
|
36
|
-
const { minScore, maxScore, scaleType } = model
|
|
37
|
-
|
|
38
|
-
const [min, setMin] = useState(
|
|
39
|
-
`${minScore !== Number.MIN_VALUE ? minScore : ''}`,
|
|
40
|
-
)
|
|
41
|
-
const [max, setMax] = useState(
|
|
42
|
-
`${maxScore !== Number.MAX_VALUE ? maxScore : ''}`,
|
|
43
|
-
)
|
|
44
|
-
|
|
45
|
-
const ok =
|
|
46
|
-
min !== '' && max !== '' && !Number.isNaN(+min) && !Number.isNaN(+max)
|
|
47
|
-
? +max > +min
|
|
48
|
-
: true
|
|
49
|
-
|
|
50
|
-
const logOk =
|
|
51
|
-
scaleType === 'log' && min !== '' && !Number.isNaN(+min) ? +min > 0 : true
|
|
52
|
-
|
|
53
|
-
return (
|
|
54
|
-
<Dialog open onClose={handleClose}>
|
|
55
|
-
<DialogTitle>
|
|
56
|
-
Set min/max score for track
|
|
57
|
-
<IconButton className={classes.closeButton} onClick={handleClose}>
|
|
58
|
-
<CloseIcon />
|
|
59
|
-
</IconButton>
|
|
60
|
-
</DialogTitle>
|
|
61
|
-
<DialogContent style={{ overflowX: 'hidden' }}>
|
|
62
|
-
<div className={classes.root}>
|
|
63
|
-
<Typography>Enter min/max score: </Typography>
|
|
64
|
-
{!ok ? (
|
|
65
|
-
<Typography color="error">
|
|
66
|
-
Max is greater than or equal to min
|
|
67
|
-
</Typography>
|
|
68
|
-
) : null}
|
|
69
|
-
|
|
70
|
-
{!logOk ? (
|
|
71
|
-
<Typography color="error">
|
|
72
|
-
Min score should be greater than 0 for log scale
|
|
73
|
-
</Typography>
|
|
74
|
-
) : null}
|
|
75
|
-
|
|
76
|
-
<TextField
|
|
77
|
-
value={min}
|
|
78
|
-
onChange={event => {
|
|
79
|
-
setMin(event.target.value)
|
|
80
|
-
}}
|
|
81
|
-
placeholder="Enter min score"
|
|
82
|
-
/>
|
|
83
|
-
<TextField
|
|
84
|
-
value={max}
|
|
85
|
-
onChange={event => {
|
|
86
|
-
setMax(event.target.value)
|
|
87
|
-
}}
|
|
88
|
-
placeholder="Enter max score"
|
|
89
|
-
/>
|
|
90
|
-
|
|
91
|
-
<Button
|
|
92
|
-
variant="contained"
|
|
93
|
-
color="primary"
|
|
94
|
-
type="submit"
|
|
95
|
-
style={{ marginLeft: 20 }}
|
|
96
|
-
disabled={!ok}
|
|
97
|
-
onClick={() => {
|
|
98
|
-
model.setMinScore(
|
|
99
|
-
min !== '' && !Number.isNaN(+min) ? +min : undefined,
|
|
100
|
-
)
|
|
101
|
-
model.setMaxScore(
|
|
102
|
-
max !== '' && !Number.isNaN(+max) ? +max : undefined,
|
|
103
|
-
)
|
|
104
|
-
handleClose()
|
|
105
|
-
}}
|
|
106
|
-
>
|
|
107
|
-
Submit
|
|
108
|
-
</Button>
|
|
109
|
-
</div>
|
|
110
|
-
</DialogContent>
|
|
111
|
-
</Dialog>
|
|
112
|
-
)
|
|
113
|
-
}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react'
|
|
2
|
-
import {
|
|
3
|
-
Button,
|
|
4
|
-
Dialog,
|
|
5
|
-
DialogContent,
|
|
6
|
-
DialogTitle,
|
|
7
|
-
IconButton,
|
|
8
|
-
TextField,
|
|
9
|
-
Typography,
|
|
10
|
-
} from '@mui/material'
|
|
11
|
-
import { makeStyles } from 'tss-react/mui'
|
|
12
|
-
import CloseIcon from '@mui/icons-material/Close'
|
|
13
|
-
|
|
14
|
-
const useStyles = makeStyles()(theme => ({
|
|
15
|
-
root: {},
|
|
16
|
-
closeButton: {
|
|
17
|
-
position: 'absolute',
|
|
18
|
-
right: theme.spacing(1),
|
|
19
|
-
top: theme.spacing(1),
|
|
20
|
-
color: theme.palette.grey[500],
|
|
21
|
-
},
|
|
22
|
-
}))
|
|
23
|
-
|
|
24
|
-
export default function SetMinMaxDlg(props: {
|
|
25
|
-
model: {
|
|
26
|
-
minScore: number
|
|
27
|
-
maxScore: number
|
|
28
|
-
scaleType: string
|
|
29
|
-
setMinScore: Function
|
|
30
|
-
setMaxScore: Function
|
|
31
|
-
}
|
|
32
|
-
handleClose: () => void
|
|
33
|
-
}) {
|
|
34
|
-
const { classes } = useStyles()
|
|
35
|
-
const { model, handleClose } = props
|
|
36
|
-
const { minScore, maxScore, scaleType } = model
|
|
37
|
-
|
|
38
|
-
const [min, setMin] = useState(
|
|
39
|
-
`${minScore !== Number.MIN_VALUE ? minScore : ''}`,
|
|
40
|
-
)
|
|
41
|
-
const [max, setMax] = useState(
|
|
42
|
-
`${maxScore !== Number.MAX_VALUE ? maxScore : ''}`,
|
|
43
|
-
)
|
|
44
|
-
|
|
45
|
-
const ok =
|
|
46
|
-
min !== '' && max !== '' && !Number.isNaN(+min) && !Number.isNaN(+max)
|
|
47
|
-
? +max > +min
|
|
48
|
-
: true
|
|
49
|
-
|
|
50
|
-
const logOk =
|
|
51
|
-
scaleType === 'log' && min !== '' && !Number.isNaN(+min) ? +min > 0 : true
|
|
52
|
-
|
|
53
|
-
return (
|
|
54
|
-
<Dialog open onClose={handleClose}>
|
|
55
|
-
<DialogTitle>
|
|
56
|
-
Set min/max score for track
|
|
57
|
-
<IconButton className={classes.closeButton} onClick={handleClose}>
|
|
58
|
-
<CloseIcon />
|
|
59
|
-
</IconButton>
|
|
60
|
-
</DialogTitle>
|
|
61
|
-
<DialogContent style={{ overflowX: 'hidden' }}>
|
|
62
|
-
<div className={classes.root}>
|
|
63
|
-
<Typography>Enter min/max score: </Typography>
|
|
64
|
-
{!ok ? (
|
|
65
|
-
<Typography color="error">
|
|
66
|
-
Max is greater than or equal to min
|
|
67
|
-
</Typography>
|
|
68
|
-
) : null}
|
|
69
|
-
|
|
70
|
-
{!logOk ? (
|
|
71
|
-
<Typography color="error">
|
|
72
|
-
Min score should be greater than 0 for log scale
|
|
73
|
-
</Typography>
|
|
74
|
-
) : null}
|
|
75
|
-
|
|
76
|
-
<TextField
|
|
77
|
-
value={min}
|
|
78
|
-
onChange={event => {
|
|
79
|
-
setMin(event.target.value)
|
|
80
|
-
}}
|
|
81
|
-
placeholder="Enter min score"
|
|
82
|
-
/>
|
|
83
|
-
<TextField
|
|
84
|
-
value={max}
|
|
85
|
-
onChange={event => {
|
|
86
|
-
setMax(event.target.value)
|
|
87
|
-
}}
|
|
88
|
-
placeholder="Enter max score"
|
|
89
|
-
/>
|
|
90
|
-
|
|
91
|
-
<Button
|
|
92
|
-
variant="contained"
|
|
93
|
-
color="primary"
|
|
94
|
-
type="submit"
|
|
95
|
-
style={{ marginLeft: 20 }}
|
|
96
|
-
disabled={!ok}
|
|
97
|
-
onClick={() => {
|
|
98
|
-
model.setMinScore(
|
|
99
|
-
min !== '' && !Number.isNaN(+min) ? +min : undefined,
|
|
100
|
-
)
|
|
101
|
-
model.setMaxScore(
|
|
102
|
-
max !== '' && !Number.isNaN(+max) ? +max : undefined,
|
|
103
|
-
)
|
|
104
|
-
handleClose()
|
|
105
|
-
}}
|
|
106
|
-
>
|
|
107
|
-
Submit
|
|
108
|
-
</Button>
|
|
109
|
-
</div>
|
|
110
|
-
</DialogContent>
|
|
111
|
-
</Dialog>
|
|
112
|
-
)
|
|
113
|
-
}
|