@teselagen/ove 0.5.27 → 0.5.29
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/index.cjs.js +22 -17
- package/index.es.js +22 -17
- package/index.umd.js +22 -17
- package/package.json +2 -2
- package/src/CircularView/index.js +0 -2
- package/src/RowItem/Sequence.js +17 -7
- package/src/RowItem/StackedAnnotations/getStructuredBases.js +2 -2
- package/src/style.css +0 -3
- package/src/withEditorInteractions/clickAndDragUtils.js +0 -2
- package/style.css +0 -3
package/index.cjs.js
CHANGED
|
@@ -69607,8 +69607,6 @@ var DraggableCore$1 = /* @__PURE__ */ function(_React$Component) {
|
|
|
69607
69607
|
if (_this.props.disabled || !(e2.target instanceof ownerDocument.defaultView.Node) || _this.props.handle && !(0, _domFns.matchesSelectorAndParentsTo)(e2.target, _this.props.handle, thisNode) || _this.props.cancel && (0, _domFns.matchesSelectorAndParentsTo)(e2.target, _this.props.cancel, thisNode)) {
|
|
69608
69608
|
return;
|
|
69609
69609
|
}
|
|
69610
|
-
if (e2.type === "touchstart")
|
|
69611
|
-
e2.preventDefault();
|
|
69612
69610
|
var touchIdentifier = (0, _domFns.getTouchIdentifier)(e2);
|
|
69613
69611
|
_this.setState({
|
|
69614
69612
|
touchIdentifier
|
|
@@ -117907,10 +117905,10 @@ const _Sequence = class _Sequence extends React$2.Component {
|
|
|
117907
117905
|
}, containerStyle);
|
|
117908
117906
|
const width = rowSeqLen * charWidth2;
|
|
117909
117907
|
let inner2;
|
|
117910
|
-
const shared =
|
|
117908
|
+
const shared = {
|
|
117911
117909
|
y: height2 - height2 / 4,
|
|
117912
117910
|
className: "ve-monospace-font " + (isReverse ? " ve-sequence-reverse" : "")
|
|
117913
|
-
}
|
|
117911
|
+
};
|
|
117914
117912
|
if (scrollData) {
|
|
117915
117913
|
const numChunks = Math.ceil(rowSeqLen / chunkSize);
|
|
117916
117914
|
const chunkWidth = chunkSize * charWidth2;
|
|
@@ -117924,12 +117922,13 @@ const _Sequence = class _Sequence extends React$2.Component {
|
|
|
117924
117922
|
const x = i * chunkWidth;
|
|
117925
117923
|
if (x > visibleEnd || x + textLength < visibleStart)
|
|
117926
117924
|
return null;
|
|
117925
|
+
const tlToUse = Math.max(0, textLength - fudge - fudge2);
|
|
117927
117926
|
return /* @__PURE__ */ React$2.createElement(
|
|
117928
117927
|
"text",
|
|
117929
117928
|
__spreadValues({
|
|
117930
117929
|
key: i
|
|
117931
117930
|
}, __spreadProps(__spreadValues({}, shared), {
|
|
117932
|
-
textLength:
|
|
117931
|
+
textLength: tlToUse,
|
|
117933
117932
|
x: x + fudge / 2,
|
|
117934
117933
|
lengthAdjust: "spacing"
|
|
117935
117934
|
})),
|
|
@@ -117937,16 +117936,22 @@ const _Sequence = class _Sequence extends React$2.Component {
|
|
|
117937
117936
|
);
|
|
117938
117937
|
});
|
|
117939
117938
|
} else {
|
|
117939
|
+
const tlToUse = Math.max(
|
|
117940
|
+
0,
|
|
117941
|
+
(alignmentData ? seqReadWidth : width) - fudge - fudge2
|
|
117942
|
+
);
|
|
117940
117943
|
inner2 = /* @__PURE__ */ React$2.createElement(
|
|
117941
117944
|
"text",
|
|
117942
117945
|
__spreadValues({}, __spreadProps(__spreadValues({}, shared), {
|
|
117943
117946
|
x: 0 + fudge / 2,
|
|
117944
|
-
textLength:
|
|
117945
|
-
0,
|
|
117946
|
-
(alignmentData ? seqReadWidth : width) - fudge - fudge2
|
|
117947
|
-
)
|
|
117947
|
+
textLength: tlToUse
|
|
117948
117948
|
})),
|
|
117949
|
-
getBoldRegion({
|
|
117949
|
+
getBoldRegion({
|
|
117950
|
+
sequence: sequence2,
|
|
117951
|
+
overlapToBold,
|
|
117952
|
+
rowStart,
|
|
117953
|
+
sequenceLength
|
|
117954
|
+
})
|
|
117950
117955
|
);
|
|
117951
117956
|
}
|
|
117952
117957
|
return /* @__PURE__ */ React$2.createElement(
|
|
@@ -118058,6 +118063,9 @@ const _ColoredSequence = class _ColoredSequence extends React$2.Component {
|
|
|
118058
118063
|
__name(_ColoredSequence, "ColoredSequence");
|
|
118059
118064
|
let ColoredSequence = _ColoredSequence;
|
|
118060
118065
|
function getBoldRegion({ sequence: sequence2, overlapToBold, rowStart, sequenceLength }) {
|
|
118066
|
+
if (isSafari) {
|
|
118067
|
+
return sequence2;
|
|
118068
|
+
}
|
|
118061
118069
|
const toRet = [];
|
|
118062
118070
|
const [a2, b3] = overlapToBold || [];
|
|
118063
118071
|
for (let index2 = rowStart; index2 < sequence2.length + rowStart; index2++) {
|
|
@@ -119361,13 +119369,14 @@ function getStructuredBases({
|
|
|
119361
119369
|
forward ? r2.basesNoInserts : r2.basesNoInserts.split("").reverse().join("")
|
|
119362
119370
|
);
|
|
119363
119371
|
r2.basesNoInsertsWithMetaData = basesForRange.split("").map((b3, i) => {
|
|
119372
|
+
var _a2, _b2;
|
|
119364
119373
|
const indexOfBase = i + annotationRange.start;
|
|
119365
119374
|
let seqForBase = fullSequence && fullSequence[indexOfBase] || "";
|
|
119366
119375
|
if (!forward) {
|
|
119367
119376
|
seqForBase = getComplementSequenceString(seqForBase);
|
|
119368
119377
|
}
|
|
119369
119378
|
const isMatch = seqForBase.toLowerCase() === b3.toLowerCase();
|
|
119370
|
-
const isAmbiguousMatch = !isMatch && ambiguous_dna_values[b3.toUpperCase()].length > 1 && ambiguous_dna_values[b3.toUpperCase()].includes(seqForBase.toUpperCase());
|
|
119379
|
+
const isAmbiguousMatch = !isMatch && ((_a2 = ambiguous_dna_values[b3.toUpperCase()]) == null ? void 0 : _a2.length) > 1 && ((_b2 = ambiguous_dna_values[b3.toUpperCase()]) == null ? void 0 : _b2.includes(seqForBase.toUpperCase()));
|
|
119371
119380
|
return {
|
|
119372
119381
|
b: b3,
|
|
119373
119382
|
isMatch,
|
|
@@ -122401,8 +122410,8 @@ function showFileDialog({ multiple = false, onSelect }) {
|
|
|
122401
122410
|
}
|
|
122402
122411
|
__name(showFileDialog, "showFileDialog");
|
|
122403
122412
|
const name = "@teselagen/ove";
|
|
122404
|
-
const version = "0.5.
|
|
122405
|
-
const main = "./
|
|
122413
|
+
const version = "0.5.28";
|
|
122414
|
+
const main = "./index.js";
|
|
122406
122415
|
const type = "module";
|
|
122407
122416
|
const exports$1 = {
|
|
122408
122417
|
".": {
|
|
@@ -126443,14 +126452,12 @@ const editorClicked = /* @__PURE__ */ __name(function({
|
|
|
126443
126452
|
shiftHeld,
|
|
126444
126453
|
updateSelectionOrCaret: updateSelectionOrCaret2
|
|
126445
126454
|
}) {
|
|
126446
|
-
console.log(`asdfasfwaofijaweofj`);
|
|
126447
126455
|
const timeDif = (/* @__PURE__ */ new Date()).getTime() - dragInProgress;
|
|
126448
126456
|
if (!dragInProgress || 200 > timeDif) {
|
|
126449
126457
|
updateSelectionOrCaret2(shiftHeld, nearestCaretPos);
|
|
126450
126458
|
}
|
|
126451
126459
|
}, "editorClicked");
|
|
126452
126460
|
const editorDragStarted = /* @__PURE__ */ __name(function(opts2) {
|
|
126453
|
-
console.log(`wewfwf`);
|
|
126454
126461
|
document == null ? void 0 : document.body.classList.add("sequenceDragging");
|
|
126455
126462
|
window.__veDragging = true;
|
|
126456
126463
|
caretPositionOnDragStart = opts2.nearestCaretPos;
|
|
@@ -134131,9 +134138,7 @@ function CircularView(props) {
|
|
|
134131
134138
|
"svg",
|
|
134132
134139
|
{
|
|
134133
134140
|
key: "circViewSvg",
|
|
134134
|
-
onTouch: true,
|
|
134135
134141
|
onClick: (event) => {
|
|
134136
|
-
console.log(`23232323`);
|
|
134137
134142
|
instantiated && getNearestCursorPositionToMouseEvent(
|
|
134138
134143
|
event,
|
|
134139
134144
|
toPass,
|
package/index.es.js
CHANGED
|
@@ -69589,8 +69589,6 @@ var DraggableCore$1 = /* @__PURE__ */ function(_React$Component) {
|
|
|
69589
69589
|
if (_this.props.disabled || !(e2.target instanceof ownerDocument.defaultView.Node) || _this.props.handle && !(0, _domFns.matchesSelectorAndParentsTo)(e2.target, _this.props.handle, thisNode) || _this.props.cancel && (0, _domFns.matchesSelectorAndParentsTo)(e2.target, _this.props.cancel, thisNode)) {
|
|
69590
69590
|
return;
|
|
69591
69591
|
}
|
|
69592
|
-
if (e2.type === "touchstart")
|
|
69593
|
-
e2.preventDefault();
|
|
69594
69592
|
var touchIdentifier = (0, _domFns.getTouchIdentifier)(e2);
|
|
69595
69593
|
_this.setState({
|
|
69596
69594
|
touchIdentifier
|
|
@@ -117889,10 +117887,10 @@ const _Sequence = class _Sequence extends React__default$1.Component {
|
|
|
117889
117887
|
}, containerStyle);
|
|
117890
117888
|
const width = rowSeqLen * charWidth2;
|
|
117891
117889
|
let inner2;
|
|
117892
|
-
const shared =
|
|
117890
|
+
const shared = {
|
|
117893
117891
|
y: height2 - height2 / 4,
|
|
117894
117892
|
className: "ve-monospace-font " + (isReverse ? " ve-sequence-reverse" : "")
|
|
117895
|
-
}
|
|
117893
|
+
};
|
|
117896
117894
|
if (scrollData) {
|
|
117897
117895
|
const numChunks = Math.ceil(rowSeqLen / chunkSize);
|
|
117898
117896
|
const chunkWidth = chunkSize * charWidth2;
|
|
@@ -117906,12 +117904,13 @@ const _Sequence = class _Sequence extends React__default$1.Component {
|
|
|
117906
117904
|
const x = i * chunkWidth;
|
|
117907
117905
|
if (x > visibleEnd || x + textLength < visibleStart)
|
|
117908
117906
|
return null;
|
|
117907
|
+
const tlToUse = Math.max(0, textLength - fudge - fudge2);
|
|
117909
117908
|
return /* @__PURE__ */ React__default$1.createElement(
|
|
117910
117909
|
"text",
|
|
117911
117910
|
__spreadValues({
|
|
117912
117911
|
key: i
|
|
117913
117912
|
}, __spreadProps(__spreadValues({}, shared), {
|
|
117914
|
-
textLength:
|
|
117913
|
+
textLength: tlToUse,
|
|
117915
117914
|
x: x + fudge / 2,
|
|
117916
117915
|
lengthAdjust: "spacing"
|
|
117917
117916
|
})),
|
|
@@ -117919,16 +117918,22 @@ const _Sequence = class _Sequence extends React__default$1.Component {
|
|
|
117919
117918
|
);
|
|
117920
117919
|
});
|
|
117921
117920
|
} else {
|
|
117921
|
+
const tlToUse = Math.max(
|
|
117922
|
+
0,
|
|
117923
|
+
(alignmentData ? seqReadWidth : width) - fudge - fudge2
|
|
117924
|
+
);
|
|
117922
117925
|
inner2 = /* @__PURE__ */ React__default$1.createElement(
|
|
117923
117926
|
"text",
|
|
117924
117927
|
__spreadValues({}, __spreadProps(__spreadValues({}, shared), {
|
|
117925
117928
|
x: 0 + fudge / 2,
|
|
117926
|
-
textLength:
|
|
117927
|
-
0,
|
|
117928
|
-
(alignmentData ? seqReadWidth : width) - fudge - fudge2
|
|
117929
|
-
)
|
|
117929
|
+
textLength: tlToUse
|
|
117930
117930
|
})),
|
|
117931
|
-
getBoldRegion({
|
|
117931
|
+
getBoldRegion({
|
|
117932
|
+
sequence: sequence2,
|
|
117933
|
+
overlapToBold,
|
|
117934
|
+
rowStart,
|
|
117935
|
+
sequenceLength
|
|
117936
|
+
})
|
|
117932
117937
|
);
|
|
117933
117938
|
}
|
|
117934
117939
|
return /* @__PURE__ */ React__default$1.createElement(
|
|
@@ -118040,6 +118045,9 @@ const _ColoredSequence = class _ColoredSequence extends React__default$1.Compone
|
|
|
118040
118045
|
__name(_ColoredSequence, "ColoredSequence");
|
|
118041
118046
|
let ColoredSequence = _ColoredSequence;
|
|
118042
118047
|
function getBoldRegion({ sequence: sequence2, overlapToBold, rowStart, sequenceLength }) {
|
|
118048
|
+
if (isSafari) {
|
|
118049
|
+
return sequence2;
|
|
118050
|
+
}
|
|
118043
118051
|
const toRet = [];
|
|
118044
118052
|
const [a2, b3] = overlapToBold || [];
|
|
118045
118053
|
for (let index2 = rowStart; index2 < sequence2.length + rowStart; index2++) {
|
|
@@ -119343,13 +119351,14 @@ function getStructuredBases({
|
|
|
119343
119351
|
forward ? r2.basesNoInserts : r2.basesNoInserts.split("").reverse().join("")
|
|
119344
119352
|
);
|
|
119345
119353
|
r2.basesNoInsertsWithMetaData = basesForRange.split("").map((b3, i) => {
|
|
119354
|
+
var _a2, _b2;
|
|
119346
119355
|
const indexOfBase = i + annotationRange.start;
|
|
119347
119356
|
let seqForBase = fullSequence && fullSequence[indexOfBase] || "";
|
|
119348
119357
|
if (!forward) {
|
|
119349
119358
|
seqForBase = getComplementSequenceString(seqForBase);
|
|
119350
119359
|
}
|
|
119351
119360
|
const isMatch = seqForBase.toLowerCase() === b3.toLowerCase();
|
|
119352
|
-
const isAmbiguousMatch = !isMatch && ambiguous_dna_values[b3.toUpperCase()].length > 1 && ambiguous_dna_values[b3.toUpperCase()].includes(seqForBase.toUpperCase());
|
|
119361
|
+
const isAmbiguousMatch = !isMatch && ((_a2 = ambiguous_dna_values[b3.toUpperCase()]) == null ? void 0 : _a2.length) > 1 && ((_b2 = ambiguous_dna_values[b3.toUpperCase()]) == null ? void 0 : _b2.includes(seqForBase.toUpperCase()));
|
|
119353
119362
|
return {
|
|
119354
119363
|
b: b3,
|
|
119355
119364
|
isMatch,
|
|
@@ -122383,8 +122392,8 @@ function showFileDialog({ multiple = false, onSelect }) {
|
|
|
122383
122392
|
}
|
|
122384
122393
|
__name(showFileDialog, "showFileDialog");
|
|
122385
122394
|
const name = "@teselagen/ove";
|
|
122386
|
-
const version = "0.5.
|
|
122387
|
-
const main = "./
|
|
122395
|
+
const version = "0.5.28";
|
|
122396
|
+
const main = "./index.js";
|
|
122388
122397
|
const type = "module";
|
|
122389
122398
|
const exports$1 = {
|
|
122390
122399
|
".": {
|
|
@@ -126425,14 +126434,12 @@ const editorClicked = /* @__PURE__ */ __name(function({
|
|
|
126425
126434
|
shiftHeld,
|
|
126426
126435
|
updateSelectionOrCaret: updateSelectionOrCaret2
|
|
126427
126436
|
}) {
|
|
126428
|
-
console.log(`asdfasfwaofijaweofj`);
|
|
126429
126437
|
const timeDif = (/* @__PURE__ */ new Date()).getTime() - dragInProgress;
|
|
126430
126438
|
if (!dragInProgress || 200 > timeDif) {
|
|
126431
126439
|
updateSelectionOrCaret2(shiftHeld, nearestCaretPos);
|
|
126432
126440
|
}
|
|
126433
126441
|
}, "editorClicked");
|
|
126434
126442
|
const editorDragStarted = /* @__PURE__ */ __name(function(opts2) {
|
|
126435
|
-
console.log(`wewfwf`);
|
|
126436
126443
|
document == null ? void 0 : document.body.classList.add("sequenceDragging");
|
|
126437
126444
|
window.__veDragging = true;
|
|
126438
126445
|
caretPositionOnDragStart = opts2.nearestCaretPos;
|
|
@@ -134113,9 +134120,7 @@ function CircularView(props) {
|
|
|
134113
134120
|
"svg",
|
|
134114
134121
|
{
|
|
134115
134122
|
key: "circViewSvg",
|
|
134116
|
-
onTouch: true,
|
|
134117
134123
|
onClick: (event) => {
|
|
134118
|
-
console.log(`23232323`);
|
|
134119
134124
|
instantiated && getNearestCursorPositionToMouseEvent(
|
|
134120
134125
|
event,
|
|
134121
134126
|
toPass,
|
package/index.umd.js
CHANGED
|
@@ -98732,8 +98732,6 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
98732
98732
|
if (_this.props.disabled || !(e2.target instanceof ownerDocument.defaultView.Node) || _this.props.handle && !(0, _domFns.matchesSelectorAndParentsTo)(e2.target, _this.props.handle, thisNode) || _this.props.cancel && (0, _domFns.matchesSelectorAndParentsTo)(e2.target, _this.props.cancel, thisNode)) {
|
|
98733
98733
|
return;
|
|
98734
98734
|
}
|
|
98735
|
-
if (e2.type === "touchstart")
|
|
98736
|
-
e2.preventDefault();
|
|
98737
98735
|
var touchIdentifier = (0, _domFns.getTouchIdentifier)(e2);
|
|
98738
98736
|
_this.setState({
|
|
98739
98737
|
touchIdentifier
|
|
@@ -146363,10 +146361,10 @@ ${seq.sequence}
|
|
|
146363
146361
|
}, containerStyle);
|
|
146364
146362
|
const width = rowSeqLen * charWidth2;
|
|
146365
146363
|
let inner2;
|
|
146366
|
-
const shared =
|
|
146364
|
+
const shared = {
|
|
146367
146365
|
y: height2 - height2 / 4,
|
|
146368
146366
|
className: "ve-monospace-font " + (isReverse ? " ve-sequence-reverse" : "")
|
|
146369
|
-
}
|
|
146367
|
+
};
|
|
146370
146368
|
if (scrollData) {
|
|
146371
146369
|
const numChunks = Math.ceil(rowSeqLen / chunkSize);
|
|
146372
146370
|
const chunkWidth = chunkSize * charWidth2;
|
|
@@ -146380,12 +146378,13 @@ ${seq.sequence}
|
|
|
146380
146378
|
const x2 = i2 * chunkWidth;
|
|
146381
146379
|
if (x2 > visibleEnd || x2 + textLength < visibleStart)
|
|
146382
146380
|
return null;
|
|
146381
|
+
const tlToUse = Math.max(0, textLength - fudge - fudge2);
|
|
146383
146382
|
return /* @__PURE__ */ React$2.createElement(
|
|
146384
146383
|
"text",
|
|
146385
146384
|
__spreadValues({
|
|
146386
146385
|
key: i2
|
|
146387
146386
|
}, __spreadProps(__spreadValues({}, shared), {
|
|
146388
|
-
textLength:
|
|
146387
|
+
textLength: tlToUse,
|
|
146389
146388
|
x: x2 + fudge / 2,
|
|
146390
146389
|
lengthAdjust: "spacing"
|
|
146391
146390
|
})),
|
|
@@ -146393,16 +146392,22 @@ ${seq.sequence}
|
|
|
146393
146392
|
);
|
|
146394
146393
|
});
|
|
146395
146394
|
} else {
|
|
146395
|
+
const tlToUse = Math.max(
|
|
146396
|
+
0,
|
|
146397
|
+
(alignmentData ? seqReadWidth : width) - fudge - fudge2
|
|
146398
|
+
);
|
|
146396
146399
|
inner2 = /* @__PURE__ */ React$2.createElement(
|
|
146397
146400
|
"text",
|
|
146398
146401
|
__spreadValues({}, __spreadProps(__spreadValues({}, shared), {
|
|
146399
146402
|
x: 0 + fudge / 2,
|
|
146400
|
-
textLength:
|
|
146401
|
-
0,
|
|
146402
|
-
(alignmentData ? seqReadWidth : width) - fudge - fudge2
|
|
146403
|
-
)
|
|
146403
|
+
textLength: tlToUse
|
|
146404
146404
|
})),
|
|
146405
|
-
getBoldRegion({
|
|
146405
|
+
getBoldRegion({
|
|
146406
|
+
sequence: sequence2,
|
|
146407
|
+
overlapToBold,
|
|
146408
|
+
rowStart,
|
|
146409
|
+
sequenceLength
|
|
146410
|
+
})
|
|
146406
146411
|
);
|
|
146407
146412
|
}
|
|
146408
146413
|
return /* @__PURE__ */ React$2.createElement(
|
|
@@ -146514,6 +146519,9 @@ ${seq.sequence}
|
|
|
146514
146519
|
__name(_ColoredSequence, "ColoredSequence");
|
|
146515
146520
|
let ColoredSequence = _ColoredSequence;
|
|
146516
146521
|
function getBoldRegion({ sequence: sequence2, overlapToBold, rowStart, sequenceLength }) {
|
|
146522
|
+
if (isSafari) {
|
|
146523
|
+
return sequence2;
|
|
146524
|
+
}
|
|
146517
146525
|
const toRet = [];
|
|
146518
146526
|
const [a2, b3] = overlapToBold || [];
|
|
146519
146527
|
for (let index2 = rowStart; index2 < sequence2.length + rowStart; index2++) {
|
|
@@ -147817,13 +147825,14 @@ double click --> edit`}`;
|
|
|
147817
147825
|
forward ? r2.basesNoInserts : r2.basesNoInserts.split("").reverse().join("")
|
|
147818
147826
|
);
|
|
147819
147827
|
r2.basesNoInsertsWithMetaData = basesForRange.split("").map((b3, i2) => {
|
|
147828
|
+
var _a2, _b2;
|
|
147820
147829
|
const indexOfBase = i2 + annotationRange.start;
|
|
147821
147830
|
let seqForBase = fullSequence && fullSequence[indexOfBase] || "";
|
|
147822
147831
|
if (!forward) {
|
|
147823
147832
|
seqForBase = getComplementSequenceString(seqForBase);
|
|
147824
147833
|
}
|
|
147825
147834
|
const isMatch = seqForBase.toLowerCase() === b3.toLowerCase();
|
|
147826
|
-
const isAmbiguousMatch = !isMatch && ambiguous_dna_values[b3.toUpperCase()].length > 1 && ambiguous_dna_values[b3.toUpperCase()].includes(seqForBase.toUpperCase());
|
|
147835
|
+
const isAmbiguousMatch = !isMatch && ((_a2 = ambiguous_dna_values[b3.toUpperCase()]) == null ? void 0 : _a2.length) > 1 && ((_b2 = ambiguous_dna_values[b3.toUpperCase()]) == null ? void 0 : _b2.includes(seqForBase.toUpperCase()));
|
|
147827
147836
|
return {
|
|
147828
147837
|
b: b3,
|
|
147829
147838
|
isMatch,
|
|
@@ -150823,8 +150832,8 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
150823
150832
|
}
|
|
150824
150833
|
__name(showFileDialog, "showFileDialog");
|
|
150825
150834
|
const name = "@teselagen/ove";
|
|
150826
|
-
const version = "0.5.
|
|
150827
|
-
const main = "./
|
|
150835
|
+
const version = "0.5.28";
|
|
150836
|
+
const main = "./index.js";
|
|
150828
150837
|
const type = "module";
|
|
150829
150838
|
const exports$1 = {
|
|
150830
150839
|
".": {
|
|
@@ -153260,14 +153269,12 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
153260
153269
|
shiftHeld,
|
|
153261
153270
|
updateSelectionOrCaret: updateSelectionOrCaret2
|
|
153262
153271
|
}) {
|
|
153263
|
-
console.log(`asdfasfwaofijaweofj`);
|
|
153264
153272
|
const timeDif = (/* @__PURE__ */ new Date()).getTime() - dragInProgress;
|
|
153265
153273
|
if (!dragInProgress || 200 > timeDif) {
|
|
153266
153274
|
updateSelectionOrCaret2(shiftHeld, nearestCaretPos);
|
|
153267
153275
|
}
|
|
153268
153276
|
}, "editorClicked");
|
|
153269
153277
|
const editorDragStarted = /* @__PURE__ */ __name(function(opts2) {
|
|
153270
|
-
console.log(`wewfwf`);
|
|
153271
153278
|
document == null ? void 0 : document.body.classList.add("sequenceDragging");
|
|
153272
153279
|
window.__veDragging = true;
|
|
153273
153280
|
caretPositionOnDragStart = opts2.nearestCaretPos;
|
|
@@ -160948,9 +160955,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
160948
160955
|
"svg",
|
|
160949
160956
|
{
|
|
160950
160957
|
key: "circViewSvg",
|
|
160951
|
-
onTouch: true,
|
|
160952
160958
|
onClick: (event) => {
|
|
160953
|
-
console.log(`23232323`);
|
|
160954
160959
|
instantiated && getNearestCursorPositionToMouseEvent(
|
|
160955
160960
|
event,
|
|
160956
160961
|
toPass,
|
package/package.json
CHANGED
package/src/RowItem/Sequence.js
CHANGED
|
@@ -90,7 +90,6 @@ class Sequence extends React.Component {
|
|
|
90
90
|
|
|
91
91
|
let inner;
|
|
92
92
|
const shared = {
|
|
93
|
-
...(isSafari ? { letterSpacing: "3px" } : {}),
|
|
94
93
|
y: height - height / 4,
|
|
95
94
|
className:
|
|
96
95
|
"ve-monospace-font " + (isReverse ? " ve-sequence-reverse" : "")
|
|
@@ -108,12 +107,13 @@ class Sequence extends React.Component {
|
|
|
108
107
|
const textLength = charWidth * seqChunk.length;
|
|
109
108
|
const x = i * chunkWidth;
|
|
110
109
|
if (x > visibleEnd || x + textLength < visibleStart) return null;
|
|
110
|
+
const tlToUse = Math.max(0, textLength - fudge - fudge2);
|
|
111
111
|
return (
|
|
112
112
|
<text
|
|
113
113
|
key={i}
|
|
114
114
|
{...{
|
|
115
115
|
...shared,
|
|
116
|
-
textLength:
|
|
116
|
+
textLength: tlToUse,
|
|
117
117
|
x: x + fudge / 2,
|
|
118
118
|
lengthAdjust: "spacing"
|
|
119
119
|
}}
|
|
@@ -123,18 +123,24 @@ class Sequence extends React.Component {
|
|
|
123
123
|
);
|
|
124
124
|
});
|
|
125
125
|
} else {
|
|
126
|
+
const tlToUse = Math.max(
|
|
127
|
+
0,
|
|
128
|
+
(alignmentData ? seqReadWidth : width) - fudge - fudge2
|
|
129
|
+
);
|
|
126
130
|
inner = (
|
|
127
131
|
<text
|
|
128
132
|
{...{
|
|
129
133
|
...shared,
|
|
130
134
|
x: 0 + fudge / 2,
|
|
131
|
-
textLength:
|
|
132
|
-
0,
|
|
133
|
-
(alignmentData ? seqReadWidth : width) - fudge - fudge2
|
|
134
|
-
)
|
|
135
|
+
textLength: tlToUse
|
|
135
136
|
}}
|
|
136
137
|
>
|
|
137
|
-
{getBoldRegion({
|
|
138
|
+
{getBoldRegion({
|
|
139
|
+
sequence,
|
|
140
|
+
overlapToBold,
|
|
141
|
+
rowStart,
|
|
142
|
+
sequenceLength
|
|
143
|
+
})}
|
|
138
144
|
</text>
|
|
139
145
|
);
|
|
140
146
|
}
|
|
@@ -257,6 +263,10 @@ class ColoredSequence extends React.Component {
|
|
|
257
263
|
}
|
|
258
264
|
|
|
259
265
|
function getBoldRegion({ sequence, overlapToBold, rowStart, sequenceLength }) {
|
|
266
|
+
if (isSafari) {
|
|
267
|
+
// safari doesn't support text length with tspans so we can't bold the sequence - https://github.com/TeselaGen/tg-oss/issues/80
|
|
268
|
+
return sequence;
|
|
269
|
+
}
|
|
260
270
|
const toRet = [];
|
|
261
271
|
const [a, b] = overlapToBold || [];
|
|
262
272
|
for (let index = rowStart; index < sequence.length + rowStart; index++) {
|
|
@@ -71,8 +71,8 @@ export function getStructuredBases({
|
|
|
71
71
|
const isMatch = seqForBase.toLowerCase() === b.toLowerCase();
|
|
72
72
|
const isAmbiguousMatch =
|
|
73
73
|
!isMatch &&
|
|
74
|
-
ambiguous_dna_values[b.toUpperCase()]
|
|
75
|
-
ambiguous_dna_values[b.toUpperCase()]
|
|
74
|
+
ambiguous_dna_values[b.toUpperCase()]?.length > 1 &&
|
|
75
|
+
ambiguous_dna_values[b.toUpperCase()]?.includes(seqForBase.toUpperCase());
|
|
76
76
|
return {
|
|
77
77
|
b,
|
|
78
78
|
isMatch,
|
package/src/style.css
CHANGED
|
@@ -73,7 +73,6 @@ export const editorClicked = function ({
|
|
|
73
73
|
shiftHeld,
|
|
74
74
|
updateSelectionOrCaret
|
|
75
75
|
}) {
|
|
76
|
-
console.log(`asdfasfwaofijaweofj`)
|
|
77
76
|
const timeDif = new Date().getTime() - dragInProgress;
|
|
78
77
|
if (!dragInProgress || 200 > timeDif) {
|
|
79
78
|
//if the drag is less than 200 ms it probably isn't a real drag!
|
|
@@ -83,7 +82,6 @@ export const editorClicked = function ({
|
|
|
83
82
|
};
|
|
84
83
|
|
|
85
84
|
export const editorDragStarted = function (opts) {
|
|
86
|
-
console.log(`wewfwf`)
|
|
87
85
|
document?.body.classList.add("sequenceDragging"); //needed to prevent the input bubble from losing focus post user drag
|
|
88
86
|
window.__veDragging = true;
|
|
89
87
|
|
package/style.css
CHANGED
|
@@ -11991,9 +11991,6 @@ tspan.vePart {
|
|
|
11991
11991
|
font-style: normal;
|
|
11992
11992
|
font-display: block;
|
|
11993
11993
|
}
|
|
11994
|
-
.veEditor {
|
|
11995
|
-
cursor:'pointer'
|
|
11996
|
-
}
|
|
11997
11994
|
.ve-monospace-font {
|
|
11998
11995
|
font-family: Menlo, Monaco, monospace;
|
|
11999
11996
|
font-size: 10px;
|