@teselagen/ove 0.5.26 → 0.5.28
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 +63 -16
- package/index.es.js +63 -16
- package/index.umd.js +63 -16
- package/package.json +1 -1
- package/src/Editor/index.js +1 -0
- package/src/RowItem/Sequence.js +17 -7
- package/src/withEditorInteractions/index.js +42 -6
package/index.cjs.js
CHANGED
|
@@ -117907,10 +117907,10 @@ const _Sequence = class _Sequence extends React$2.Component {
|
|
|
117907
117907
|
}, containerStyle);
|
|
117908
117908
|
const width = rowSeqLen * charWidth2;
|
|
117909
117909
|
let inner2;
|
|
117910
|
-
const shared =
|
|
117910
|
+
const shared = {
|
|
117911
117911
|
y: height2 - height2 / 4,
|
|
117912
117912
|
className: "ve-monospace-font " + (isReverse ? " ve-sequence-reverse" : "")
|
|
117913
|
-
}
|
|
117913
|
+
};
|
|
117914
117914
|
if (scrollData) {
|
|
117915
117915
|
const numChunks = Math.ceil(rowSeqLen / chunkSize);
|
|
117916
117916
|
const chunkWidth = chunkSize * charWidth2;
|
|
@@ -117924,12 +117924,13 @@ const _Sequence = class _Sequence extends React$2.Component {
|
|
|
117924
117924
|
const x = i * chunkWidth;
|
|
117925
117925
|
if (x > visibleEnd || x + textLength < visibleStart)
|
|
117926
117926
|
return null;
|
|
117927
|
+
const tlToUse = Math.max(0, textLength - fudge - fudge2);
|
|
117927
117928
|
return /* @__PURE__ */ React$2.createElement(
|
|
117928
117929
|
"text",
|
|
117929
117930
|
__spreadValues({
|
|
117930
117931
|
key: i
|
|
117931
117932
|
}, __spreadProps(__spreadValues({}, shared), {
|
|
117932
|
-
textLength:
|
|
117933
|
+
textLength: tlToUse,
|
|
117933
117934
|
x: x + fudge / 2,
|
|
117934
117935
|
lengthAdjust: "spacing"
|
|
117935
117936
|
})),
|
|
@@ -117937,16 +117938,22 @@ const _Sequence = class _Sequence extends React$2.Component {
|
|
|
117937
117938
|
);
|
|
117938
117939
|
});
|
|
117939
117940
|
} else {
|
|
117941
|
+
const tlToUse = Math.max(
|
|
117942
|
+
0,
|
|
117943
|
+
(alignmentData ? seqReadWidth : width) - fudge - fudge2
|
|
117944
|
+
);
|
|
117940
117945
|
inner2 = /* @__PURE__ */ React$2.createElement(
|
|
117941
117946
|
"text",
|
|
117942
117947
|
__spreadValues({}, __spreadProps(__spreadValues({}, shared), {
|
|
117943
117948
|
x: 0 + fudge / 2,
|
|
117944
|
-
textLength:
|
|
117945
|
-
0,
|
|
117946
|
-
(alignmentData ? seqReadWidth : width) - fudge - fudge2
|
|
117947
|
-
)
|
|
117949
|
+
textLength: tlToUse
|
|
117948
117950
|
})),
|
|
117949
|
-
getBoldRegion({
|
|
117951
|
+
getBoldRegion({
|
|
117952
|
+
sequence: sequence2,
|
|
117953
|
+
overlapToBold,
|
|
117954
|
+
rowStart,
|
|
117955
|
+
sequenceLength
|
|
117956
|
+
})
|
|
117950
117957
|
);
|
|
117951
117958
|
}
|
|
117952
117959
|
return /* @__PURE__ */ React$2.createElement(
|
|
@@ -118058,6 +118065,9 @@ const _ColoredSequence = class _ColoredSequence extends React$2.Component {
|
|
|
118058
118065
|
__name(_ColoredSequence, "ColoredSequence");
|
|
118059
118066
|
let ColoredSequence = _ColoredSequence;
|
|
118060
118067
|
function getBoldRegion({ sequence: sequence2, overlapToBold, rowStart, sequenceLength }) {
|
|
118068
|
+
if (isSafari) {
|
|
118069
|
+
return sequence2;
|
|
118070
|
+
}
|
|
118061
118071
|
const toRet = [];
|
|
118062
118072
|
const [a2, b3] = overlapToBold || [];
|
|
118063
118073
|
for (let index2 = rowStart; index2 < sequence2.length + rowStart; index2++) {
|
|
@@ -122401,7 +122411,7 @@ function showFileDialog({ multiple = false, onSelect }) {
|
|
|
122401
122411
|
}
|
|
122402
122412
|
__name(showFileDialog, "showFileDialog");
|
|
122403
122413
|
const name = "@teselagen/ove";
|
|
122404
|
-
const version = "0.5.
|
|
122414
|
+
const version = "0.5.27";
|
|
122405
122415
|
const main = "./src/index.js";
|
|
122406
122416
|
const type = "module";
|
|
122407
122417
|
const exports$1 = {
|
|
@@ -127856,14 +127866,50 @@ function VectorInteractionHOC(Component) {
|
|
|
127856
127866
|
},
|
|
127857
127867
|
"translationRightClicked"
|
|
127858
127868
|
));
|
|
127859
|
-
__publicField(this, "featureDoubleClicked", /* @__PURE__ */ __name(({ annotation }) => {
|
|
127860
|
-
|
|
127869
|
+
__publicField(this, "featureDoubleClicked", /* @__PURE__ */ __name(({ event, annotation }) => {
|
|
127870
|
+
const { doubleClickOverrides = {} } = this.props;
|
|
127871
|
+
let preventDefault2;
|
|
127872
|
+
if (doubleClickOverrides["featureDoubleClicked"]) {
|
|
127873
|
+
preventDefault2 = doubleClickOverrides["featureDoubleClicked"]({
|
|
127874
|
+
annotation,
|
|
127875
|
+
event
|
|
127876
|
+
});
|
|
127877
|
+
}
|
|
127878
|
+
if (!preventDefault2) {
|
|
127879
|
+
event.preventDefault();
|
|
127880
|
+
event.stopPropagation();
|
|
127881
|
+
showAddOrEditAnnotationDialog({ type: "feature", annotation });
|
|
127882
|
+
}
|
|
127861
127883
|
}, "featureDoubleClicked"));
|
|
127862
|
-
__publicField(this, "partDoubleClicked", /* @__PURE__ */ __name(({ annotation }) => {
|
|
127863
|
-
|
|
127884
|
+
__publicField(this, "partDoubleClicked", /* @__PURE__ */ __name(({ event, annotation }) => {
|
|
127885
|
+
const { doubleClickOverrides = {} } = this.props;
|
|
127886
|
+
let preventDefault2;
|
|
127887
|
+
if (doubleClickOverrides["partDoubleClicked"]) {
|
|
127888
|
+
preventDefault2 = doubleClickOverrides["partDoubleClicked"]({
|
|
127889
|
+
annotation,
|
|
127890
|
+
event
|
|
127891
|
+
});
|
|
127892
|
+
}
|
|
127893
|
+
if (!preventDefault2) {
|
|
127894
|
+
event.preventDefault();
|
|
127895
|
+
event.stopPropagation();
|
|
127896
|
+
showAddOrEditAnnotationDialog({ type: "part", annotation });
|
|
127897
|
+
}
|
|
127864
127898
|
}, "partDoubleClicked"));
|
|
127865
|
-
__publicField(this, "primerDoubleClicked", /* @__PURE__ */ __name(({ annotation }) => {
|
|
127866
|
-
|
|
127899
|
+
__publicField(this, "primerDoubleClicked", /* @__PURE__ */ __name(({ event, annotation }) => {
|
|
127900
|
+
const { doubleClickOverrides = {} } = this.props;
|
|
127901
|
+
let preventDefault2;
|
|
127902
|
+
if (doubleClickOverrides["primerDoubleClicked"]) {
|
|
127903
|
+
preventDefault2 = doubleClickOverrides["primerDoubleClicked"]({
|
|
127904
|
+
annotation,
|
|
127905
|
+
event
|
|
127906
|
+
});
|
|
127907
|
+
}
|
|
127908
|
+
if (!preventDefault2) {
|
|
127909
|
+
event.preventDefault();
|
|
127910
|
+
event.stopPropagation();
|
|
127911
|
+
showAddOrEditAnnotationDialog({ type: "primer", annotation });
|
|
127912
|
+
}
|
|
127867
127913
|
}, "primerDoubleClicked"));
|
|
127868
127914
|
__publicField(this, "cutsiteDoubleClicked", /* @__PURE__ */ __name(({ annotation }) => {
|
|
127869
127915
|
showDialog({
|
|
@@ -146616,7 +146662,8 @@ const _Editor = class _Editor extends React$2.Component {
|
|
|
146616
146662
|
key: activePanelId,
|
|
146617
146663
|
fontHeightMultiplier: this.props.fontHeightMultiplier,
|
|
146618
146664
|
rightClickOverrides: this.props.rightClickOverrides,
|
|
146619
|
-
clickOverrides: this.props.clickOverrides
|
|
146665
|
+
clickOverrides: this.props.clickOverrides,
|
|
146666
|
+
doubleClickOverrides: this.props.doubleClickOverrides
|
|
146620
146667
|
}), panelPropsToSpread), {
|
|
146621
146668
|
editorName,
|
|
146622
146669
|
isProtein: sequenceData2.isProtein,
|
package/index.es.js
CHANGED
|
@@ -117889,10 +117889,10 @@ const _Sequence = class _Sequence extends React__default$1.Component {
|
|
|
117889
117889
|
}, containerStyle);
|
|
117890
117890
|
const width = rowSeqLen * charWidth2;
|
|
117891
117891
|
let inner2;
|
|
117892
|
-
const shared =
|
|
117892
|
+
const shared = {
|
|
117893
117893
|
y: height2 - height2 / 4,
|
|
117894
117894
|
className: "ve-monospace-font " + (isReverse ? " ve-sequence-reverse" : "")
|
|
117895
|
-
}
|
|
117895
|
+
};
|
|
117896
117896
|
if (scrollData) {
|
|
117897
117897
|
const numChunks = Math.ceil(rowSeqLen / chunkSize);
|
|
117898
117898
|
const chunkWidth = chunkSize * charWidth2;
|
|
@@ -117906,12 +117906,13 @@ const _Sequence = class _Sequence extends React__default$1.Component {
|
|
|
117906
117906
|
const x = i * chunkWidth;
|
|
117907
117907
|
if (x > visibleEnd || x + textLength < visibleStart)
|
|
117908
117908
|
return null;
|
|
117909
|
+
const tlToUse = Math.max(0, textLength - fudge - fudge2);
|
|
117909
117910
|
return /* @__PURE__ */ React__default$1.createElement(
|
|
117910
117911
|
"text",
|
|
117911
117912
|
__spreadValues({
|
|
117912
117913
|
key: i
|
|
117913
117914
|
}, __spreadProps(__spreadValues({}, shared), {
|
|
117914
|
-
textLength:
|
|
117915
|
+
textLength: tlToUse,
|
|
117915
117916
|
x: x + fudge / 2,
|
|
117916
117917
|
lengthAdjust: "spacing"
|
|
117917
117918
|
})),
|
|
@@ -117919,16 +117920,22 @@ const _Sequence = class _Sequence extends React__default$1.Component {
|
|
|
117919
117920
|
);
|
|
117920
117921
|
});
|
|
117921
117922
|
} else {
|
|
117923
|
+
const tlToUse = Math.max(
|
|
117924
|
+
0,
|
|
117925
|
+
(alignmentData ? seqReadWidth : width) - fudge - fudge2
|
|
117926
|
+
);
|
|
117922
117927
|
inner2 = /* @__PURE__ */ React__default$1.createElement(
|
|
117923
117928
|
"text",
|
|
117924
117929
|
__spreadValues({}, __spreadProps(__spreadValues({}, shared), {
|
|
117925
117930
|
x: 0 + fudge / 2,
|
|
117926
|
-
textLength:
|
|
117927
|
-
0,
|
|
117928
|
-
(alignmentData ? seqReadWidth : width) - fudge - fudge2
|
|
117929
|
-
)
|
|
117931
|
+
textLength: tlToUse
|
|
117930
117932
|
})),
|
|
117931
|
-
getBoldRegion({
|
|
117933
|
+
getBoldRegion({
|
|
117934
|
+
sequence: sequence2,
|
|
117935
|
+
overlapToBold,
|
|
117936
|
+
rowStart,
|
|
117937
|
+
sequenceLength
|
|
117938
|
+
})
|
|
117932
117939
|
);
|
|
117933
117940
|
}
|
|
117934
117941
|
return /* @__PURE__ */ React__default$1.createElement(
|
|
@@ -118040,6 +118047,9 @@ const _ColoredSequence = class _ColoredSequence extends React__default$1.Compone
|
|
|
118040
118047
|
__name(_ColoredSequence, "ColoredSequence");
|
|
118041
118048
|
let ColoredSequence = _ColoredSequence;
|
|
118042
118049
|
function getBoldRegion({ sequence: sequence2, overlapToBold, rowStart, sequenceLength }) {
|
|
118050
|
+
if (isSafari) {
|
|
118051
|
+
return sequence2;
|
|
118052
|
+
}
|
|
118043
118053
|
const toRet = [];
|
|
118044
118054
|
const [a2, b3] = overlapToBold || [];
|
|
118045
118055
|
for (let index2 = rowStart; index2 < sequence2.length + rowStart; index2++) {
|
|
@@ -122383,7 +122393,7 @@ function showFileDialog({ multiple = false, onSelect }) {
|
|
|
122383
122393
|
}
|
|
122384
122394
|
__name(showFileDialog, "showFileDialog");
|
|
122385
122395
|
const name = "@teselagen/ove";
|
|
122386
|
-
const version = "0.5.
|
|
122396
|
+
const version = "0.5.27";
|
|
122387
122397
|
const main = "./src/index.js";
|
|
122388
122398
|
const type = "module";
|
|
122389
122399
|
const exports$1 = {
|
|
@@ -127838,14 +127848,50 @@ function VectorInteractionHOC(Component2) {
|
|
|
127838
127848
|
},
|
|
127839
127849
|
"translationRightClicked"
|
|
127840
127850
|
));
|
|
127841
|
-
__publicField(this, "featureDoubleClicked", /* @__PURE__ */ __name(({ annotation }) => {
|
|
127842
|
-
|
|
127851
|
+
__publicField(this, "featureDoubleClicked", /* @__PURE__ */ __name(({ event, annotation }) => {
|
|
127852
|
+
const { doubleClickOverrides = {} } = this.props;
|
|
127853
|
+
let preventDefault2;
|
|
127854
|
+
if (doubleClickOverrides["featureDoubleClicked"]) {
|
|
127855
|
+
preventDefault2 = doubleClickOverrides["featureDoubleClicked"]({
|
|
127856
|
+
annotation,
|
|
127857
|
+
event
|
|
127858
|
+
});
|
|
127859
|
+
}
|
|
127860
|
+
if (!preventDefault2) {
|
|
127861
|
+
event.preventDefault();
|
|
127862
|
+
event.stopPropagation();
|
|
127863
|
+
showAddOrEditAnnotationDialog({ type: "feature", annotation });
|
|
127864
|
+
}
|
|
127843
127865
|
}, "featureDoubleClicked"));
|
|
127844
|
-
__publicField(this, "partDoubleClicked", /* @__PURE__ */ __name(({ annotation }) => {
|
|
127845
|
-
|
|
127866
|
+
__publicField(this, "partDoubleClicked", /* @__PURE__ */ __name(({ event, annotation }) => {
|
|
127867
|
+
const { doubleClickOverrides = {} } = this.props;
|
|
127868
|
+
let preventDefault2;
|
|
127869
|
+
if (doubleClickOverrides["partDoubleClicked"]) {
|
|
127870
|
+
preventDefault2 = doubleClickOverrides["partDoubleClicked"]({
|
|
127871
|
+
annotation,
|
|
127872
|
+
event
|
|
127873
|
+
});
|
|
127874
|
+
}
|
|
127875
|
+
if (!preventDefault2) {
|
|
127876
|
+
event.preventDefault();
|
|
127877
|
+
event.stopPropagation();
|
|
127878
|
+
showAddOrEditAnnotationDialog({ type: "part", annotation });
|
|
127879
|
+
}
|
|
127846
127880
|
}, "partDoubleClicked"));
|
|
127847
|
-
__publicField(this, "primerDoubleClicked", /* @__PURE__ */ __name(({ annotation }) => {
|
|
127848
|
-
|
|
127881
|
+
__publicField(this, "primerDoubleClicked", /* @__PURE__ */ __name(({ event, annotation }) => {
|
|
127882
|
+
const { doubleClickOverrides = {} } = this.props;
|
|
127883
|
+
let preventDefault2;
|
|
127884
|
+
if (doubleClickOverrides["primerDoubleClicked"]) {
|
|
127885
|
+
preventDefault2 = doubleClickOverrides["primerDoubleClicked"]({
|
|
127886
|
+
annotation,
|
|
127887
|
+
event
|
|
127888
|
+
});
|
|
127889
|
+
}
|
|
127890
|
+
if (!preventDefault2) {
|
|
127891
|
+
event.preventDefault();
|
|
127892
|
+
event.stopPropagation();
|
|
127893
|
+
showAddOrEditAnnotationDialog({ type: "primer", annotation });
|
|
127894
|
+
}
|
|
127849
127895
|
}, "primerDoubleClicked"));
|
|
127850
127896
|
__publicField(this, "cutsiteDoubleClicked", /* @__PURE__ */ __name(({ annotation }) => {
|
|
127851
127897
|
showDialog({
|
|
@@ -146598,7 +146644,8 @@ const _Editor = class _Editor extends React__default$1.Component {
|
|
|
146598
146644
|
key: activePanelId,
|
|
146599
146645
|
fontHeightMultiplier: this.props.fontHeightMultiplier,
|
|
146600
146646
|
rightClickOverrides: this.props.rightClickOverrides,
|
|
146601
|
-
clickOverrides: this.props.clickOverrides
|
|
146647
|
+
clickOverrides: this.props.clickOverrides,
|
|
146648
|
+
doubleClickOverrides: this.props.doubleClickOverrides
|
|
146602
146649
|
}), panelPropsToSpread), {
|
|
146603
146650
|
editorName,
|
|
146604
146651
|
isProtein: sequenceData2.isProtein,
|
package/index.umd.js
CHANGED
|
@@ -146363,10 +146363,10 @@ ${seq.sequence}
|
|
|
146363
146363
|
}, containerStyle);
|
|
146364
146364
|
const width = rowSeqLen * charWidth2;
|
|
146365
146365
|
let inner2;
|
|
146366
|
-
const shared =
|
|
146366
|
+
const shared = {
|
|
146367
146367
|
y: height2 - height2 / 4,
|
|
146368
146368
|
className: "ve-monospace-font " + (isReverse ? " ve-sequence-reverse" : "")
|
|
146369
|
-
}
|
|
146369
|
+
};
|
|
146370
146370
|
if (scrollData) {
|
|
146371
146371
|
const numChunks = Math.ceil(rowSeqLen / chunkSize);
|
|
146372
146372
|
const chunkWidth = chunkSize * charWidth2;
|
|
@@ -146380,12 +146380,13 @@ ${seq.sequence}
|
|
|
146380
146380
|
const x2 = i2 * chunkWidth;
|
|
146381
146381
|
if (x2 > visibleEnd || x2 + textLength < visibleStart)
|
|
146382
146382
|
return null;
|
|
146383
|
+
const tlToUse = Math.max(0, textLength - fudge - fudge2);
|
|
146383
146384
|
return /* @__PURE__ */ React$2.createElement(
|
|
146384
146385
|
"text",
|
|
146385
146386
|
__spreadValues({
|
|
146386
146387
|
key: i2
|
|
146387
146388
|
}, __spreadProps(__spreadValues({}, shared), {
|
|
146388
|
-
textLength:
|
|
146389
|
+
textLength: tlToUse,
|
|
146389
146390
|
x: x2 + fudge / 2,
|
|
146390
146391
|
lengthAdjust: "spacing"
|
|
146391
146392
|
})),
|
|
@@ -146393,16 +146394,22 @@ ${seq.sequence}
|
|
|
146393
146394
|
);
|
|
146394
146395
|
});
|
|
146395
146396
|
} else {
|
|
146397
|
+
const tlToUse = Math.max(
|
|
146398
|
+
0,
|
|
146399
|
+
(alignmentData ? seqReadWidth : width) - fudge - fudge2
|
|
146400
|
+
);
|
|
146396
146401
|
inner2 = /* @__PURE__ */ React$2.createElement(
|
|
146397
146402
|
"text",
|
|
146398
146403
|
__spreadValues({}, __spreadProps(__spreadValues({}, shared), {
|
|
146399
146404
|
x: 0 + fudge / 2,
|
|
146400
|
-
textLength:
|
|
146401
|
-
0,
|
|
146402
|
-
(alignmentData ? seqReadWidth : width) - fudge - fudge2
|
|
146403
|
-
)
|
|
146405
|
+
textLength: tlToUse
|
|
146404
146406
|
})),
|
|
146405
|
-
getBoldRegion({
|
|
146407
|
+
getBoldRegion({
|
|
146408
|
+
sequence: sequence2,
|
|
146409
|
+
overlapToBold,
|
|
146410
|
+
rowStart,
|
|
146411
|
+
sequenceLength
|
|
146412
|
+
})
|
|
146406
146413
|
);
|
|
146407
146414
|
}
|
|
146408
146415
|
return /* @__PURE__ */ React$2.createElement(
|
|
@@ -146514,6 +146521,9 @@ ${seq.sequence}
|
|
|
146514
146521
|
__name(_ColoredSequence, "ColoredSequence");
|
|
146515
146522
|
let ColoredSequence = _ColoredSequence;
|
|
146516
146523
|
function getBoldRegion({ sequence: sequence2, overlapToBold, rowStart, sequenceLength }) {
|
|
146524
|
+
if (isSafari) {
|
|
146525
|
+
return sequence2;
|
|
146526
|
+
}
|
|
146517
146527
|
const toRet = [];
|
|
146518
146528
|
const [a2, b3] = overlapToBold || [];
|
|
146519
146529
|
for (let index2 = rowStart; index2 < sequence2.length + rowStart; index2++) {
|
|
@@ -150823,7 +150833,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
150823
150833
|
}
|
|
150824
150834
|
__name(showFileDialog, "showFileDialog");
|
|
150825
150835
|
const name = "@teselagen/ove";
|
|
150826
|
-
const version = "0.5.
|
|
150836
|
+
const version = "0.5.27";
|
|
150827
150837
|
const main = "./src/index.js";
|
|
150828
150838
|
const type = "module";
|
|
150829
150839
|
const exports$1 = {
|
|
@@ -154673,14 +154683,50 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
154673
154683
|
},
|
|
154674
154684
|
"translationRightClicked"
|
|
154675
154685
|
));
|
|
154676
|
-
__publicField(this, "featureDoubleClicked", /* @__PURE__ */ __name(({ annotation }) => {
|
|
154677
|
-
|
|
154686
|
+
__publicField(this, "featureDoubleClicked", /* @__PURE__ */ __name(({ event, annotation }) => {
|
|
154687
|
+
const { doubleClickOverrides = {} } = this.props;
|
|
154688
|
+
let preventDefault2;
|
|
154689
|
+
if (doubleClickOverrides["featureDoubleClicked"]) {
|
|
154690
|
+
preventDefault2 = doubleClickOverrides["featureDoubleClicked"]({
|
|
154691
|
+
annotation,
|
|
154692
|
+
event
|
|
154693
|
+
});
|
|
154694
|
+
}
|
|
154695
|
+
if (!preventDefault2) {
|
|
154696
|
+
event.preventDefault();
|
|
154697
|
+
event.stopPropagation();
|
|
154698
|
+
showAddOrEditAnnotationDialog({ type: "feature", annotation });
|
|
154699
|
+
}
|
|
154678
154700
|
}, "featureDoubleClicked"));
|
|
154679
|
-
__publicField(this, "partDoubleClicked", /* @__PURE__ */ __name(({ annotation }) => {
|
|
154680
|
-
|
|
154701
|
+
__publicField(this, "partDoubleClicked", /* @__PURE__ */ __name(({ event, annotation }) => {
|
|
154702
|
+
const { doubleClickOverrides = {} } = this.props;
|
|
154703
|
+
let preventDefault2;
|
|
154704
|
+
if (doubleClickOverrides["partDoubleClicked"]) {
|
|
154705
|
+
preventDefault2 = doubleClickOverrides["partDoubleClicked"]({
|
|
154706
|
+
annotation,
|
|
154707
|
+
event
|
|
154708
|
+
});
|
|
154709
|
+
}
|
|
154710
|
+
if (!preventDefault2) {
|
|
154711
|
+
event.preventDefault();
|
|
154712
|
+
event.stopPropagation();
|
|
154713
|
+
showAddOrEditAnnotationDialog({ type: "part", annotation });
|
|
154714
|
+
}
|
|
154681
154715
|
}, "partDoubleClicked"));
|
|
154682
|
-
__publicField(this, "primerDoubleClicked", /* @__PURE__ */ __name(({ annotation }) => {
|
|
154683
|
-
|
|
154716
|
+
__publicField(this, "primerDoubleClicked", /* @__PURE__ */ __name(({ event, annotation }) => {
|
|
154717
|
+
const { doubleClickOverrides = {} } = this.props;
|
|
154718
|
+
let preventDefault2;
|
|
154719
|
+
if (doubleClickOverrides["primerDoubleClicked"]) {
|
|
154720
|
+
preventDefault2 = doubleClickOverrides["primerDoubleClicked"]({
|
|
154721
|
+
annotation,
|
|
154722
|
+
event
|
|
154723
|
+
});
|
|
154724
|
+
}
|
|
154725
|
+
if (!preventDefault2) {
|
|
154726
|
+
event.preventDefault();
|
|
154727
|
+
event.stopPropagation();
|
|
154728
|
+
showAddOrEditAnnotationDialog({ type: "primer", annotation });
|
|
154729
|
+
}
|
|
154684
154730
|
}, "primerDoubleClicked"));
|
|
154685
154731
|
__publicField(this, "cutsiteDoubleClicked", /* @__PURE__ */ __name(({ annotation }) => {
|
|
154686
154732
|
showDialog({
|
|
@@ -172921,7 +172967,8 @@ ${seqDataToCopy}\r
|
|
|
172921
172967
|
key: activePanelId,
|
|
172922
172968
|
fontHeightMultiplier: this.props.fontHeightMultiplier,
|
|
172923
172969
|
rightClickOverrides: this.props.rightClickOverrides,
|
|
172924
|
-
clickOverrides: this.props.clickOverrides
|
|
172970
|
+
clickOverrides: this.props.clickOverrides,
|
|
172971
|
+
doubleClickOverrides: this.props.doubleClickOverrides
|
|
172925
172972
|
}), panelPropsToSpread), {
|
|
172926
172973
|
editorName,
|
|
172927
172974
|
isProtein: sequenceData2.isProtein,
|
package/package.json
CHANGED
package/src/Editor/index.js
CHANGED
|
@@ -589,6 +589,7 @@ export class Editor extends React.Component {
|
|
|
589
589
|
fontHeightMultiplier={this.props.fontHeightMultiplier}
|
|
590
590
|
rightClickOverrides={this.props.rightClickOverrides}
|
|
591
591
|
clickOverrides={this.props.clickOverrides}
|
|
592
|
+
doubleClickOverrides={this.props.doubleClickOverrides}
|
|
592
593
|
{...panelPropsToSpread}
|
|
593
594
|
editorName={editorName}
|
|
594
595
|
isProtein={sequenceData.isProtein}
|
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++) {
|
|
@@ -1096,14 +1096,50 @@ function VectorInteractionHOC(Component /* options */) {
|
|
|
1096
1096
|
"translationRightClicked"
|
|
1097
1097
|
);
|
|
1098
1098
|
|
|
1099
|
-
featureDoubleClicked = ({ annotation }) => {
|
|
1100
|
-
|
|
1099
|
+
featureDoubleClicked = ({ event, annotation }) => {
|
|
1100
|
+
const { doubleClickOverrides = {} } = this.props;
|
|
1101
|
+
let preventDefault;
|
|
1102
|
+
if (doubleClickOverrides["featureDoubleClicked"]) {
|
|
1103
|
+
preventDefault = doubleClickOverrides["featureDoubleClicked"]({
|
|
1104
|
+
annotation,
|
|
1105
|
+
event
|
|
1106
|
+
});
|
|
1107
|
+
}
|
|
1108
|
+
if (!preventDefault) {
|
|
1109
|
+
event.preventDefault();
|
|
1110
|
+
event.stopPropagation();
|
|
1111
|
+
showAddOrEditAnnotationDialog({ type: "feature", annotation });
|
|
1112
|
+
}
|
|
1101
1113
|
};
|
|
1102
|
-
partDoubleClicked = ({ annotation }) => {
|
|
1103
|
-
|
|
1114
|
+
partDoubleClicked = ({ event, annotation }) => {
|
|
1115
|
+
const { doubleClickOverrides = {} } = this.props;
|
|
1116
|
+
let preventDefault;
|
|
1117
|
+
if (doubleClickOverrides["partDoubleClicked"]) {
|
|
1118
|
+
preventDefault = doubleClickOverrides["partDoubleClicked"]({
|
|
1119
|
+
annotation,
|
|
1120
|
+
event
|
|
1121
|
+
});
|
|
1122
|
+
}
|
|
1123
|
+
if (!preventDefault) {
|
|
1124
|
+
event.preventDefault();
|
|
1125
|
+
event.stopPropagation();
|
|
1126
|
+
showAddOrEditAnnotationDialog({ type: "part", annotation });
|
|
1127
|
+
}
|
|
1104
1128
|
};
|
|
1105
|
-
primerDoubleClicked = ({ annotation }) => {
|
|
1106
|
-
|
|
1129
|
+
primerDoubleClicked = ({ event, annotation }) => {
|
|
1130
|
+
const { doubleClickOverrides = {} } = this.props;
|
|
1131
|
+
let preventDefault;
|
|
1132
|
+
if (doubleClickOverrides["primerDoubleClicked"]) {
|
|
1133
|
+
preventDefault = doubleClickOverrides["primerDoubleClicked"]({
|
|
1134
|
+
annotation,
|
|
1135
|
+
event
|
|
1136
|
+
});
|
|
1137
|
+
}
|
|
1138
|
+
if (!preventDefault) {
|
|
1139
|
+
event.preventDefault();
|
|
1140
|
+
event.stopPropagation();
|
|
1141
|
+
showAddOrEditAnnotationDialog({ type: "primer", annotation });
|
|
1142
|
+
}
|
|
1107
1143
|
};
|
|
1108
1144
|
cutsiteDoubleClicked = ({ annotation }) => {
|
|
1109
1145
|
showDialog({
|