@teselagen/ove 0.8.28 → 0.8.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 CHANGED
@@ -116986,7 +116986,7 @@ function showFileDialog({ multiple = false, onSelect }) {
116986
116986
  input.click();
116987
116987
  }
116988
116988
  __name(showFileDialog, "showFileDialog");
116989
- const version = "0.8.28";
116989
+ const version = "0.8.29";
116990
116990
  const packageJson = {
116991
116991
  version
116992
116992
  };
@@ -124405,6 +124405,8 @@ const __LinearView = class __LinearView extends React.Component {
124405
124405
  }));
124406
124406
  }
124407
124407
  getNearestCursorPositionToMouseEvent(rowData, event, callback2) {
124408
+ var _a2;
124409
+ const isProtein2 = (_a2 = this.props.sequenceData) == null ? void 0 : _a2.isProtein;
124408
124410
  let nearestCaretPos = 0;
124409
124411
  let rowDomNode = this.linearView;
124410
124412
  rowDomNode = rowDomNode.querySelector(".veRowItem");
@@ -124418,11 +124420,11 @@ const __LinearView = class __LinearView extends React.Component {
124418
124420
  (clickXPositionRelativeToRowContainer + this.charWidth / 2) / this.charWidth
124419
124421
  );
124420
124422
  nearestCaretPos = numberOfBPsInFromRowStart + 0;
124421
- if (nearestCaretPos > maxEnd + 1) {
124422
- nearestCaretPos = maxEnd + 1;
124423
+ if (nearestCaretPos > maxEnd) {
124424
+ nearestCaretPos = isProtein2 ? maxEnd + 1 : maxEnd;
124423
124425
  }
124424
124426
  }
124425
- if (this.props.sequenceData && this.props.sequenceData.isProtein) {
124427
+ if (isProtein2) {
124426
124428
  nearestCaretPos = Math.round(nearestCaretPos / 3) * 3;
124427
124429
  }
124428
124430
  if (maxEnd === 0) nearestCaretPos = 0;
package/index.es.js CHANGED
@@ -116968,7 +116968,7 @@ function showFileDialog({ multiple = false, onSelect }) {
116968
116968
  input.click();
116969
116969
  }
116970
116970
  __name(showFileDialog, "showFileDialog");
116971
- const version = "0.8.28";
116971
+ const version = "0.8.29";
116972
116972
  const packageJson = {
116973
116973
  version
116974
116974
  };
@@ -124387,6 +124387,8 @@ const __LinearView = class __LinearView extends React__default.Component {
124387
124387
  }));
124388
124388
  }
124389
124389
  getNearestCursorPositionToMouseEvent(rowData, event, callback2) {
124390
+ var _a2;
124391
+ const isProtein2 = (_a2 = this.props.sequenceData) == null ? void 0 : _a2.isProtein;
124390
124392
  let nearestCaretPos = 0;
124391
124393
  let rowDomNode = this.linearView;
124392
124394
  rowDomNode = rowDomNode.querySelector(".veRowItem");
@@ -124400,11 +124402,11 @@ const __LinearView = class __LinearView extends React__default.Component {
124400
124402
  (clickXPositionRelativeToRowContainer + this.charWidth / 2) / this.charWidth
124401
124403
  );
124402
124404
  nearestCaretPos = numberOfBPsInFromRowStart + 0;
124403
- if (nearestCaretPos > maxEnd + 1) {
124404
- nearestCaretPos = maxEnd + 1;
124405
+ if (nearestCaretPos > maxEnd) {
124406
+ nearestCaretPos = isProtein2 ? maxEnd + 1 : maxEnd;
124405
124407
  }
124406
124408
  }
124407
- if (this.props.sequenceData && this.props.sequenceData.isProtein) {
124409
+ if (isProtein2) {
124408
124410
  nearestCaretPos = Math.round(nearestCaretPos / 3) * 3;
124409
124411
  }
124410
124412
  if (maxEnd === 0) nearestCaretPos = 0;
package/index.umd.js CHANGED
@@ -145084,7 +145084,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
145084
145084
  input.click();
145085
145085
  }
145086
145086
  __name(showFileDialog, "showFileDialog");
145087
- const version = "0.8.28";
145087
+ const version = "0.8.29";
145088
145088
  const packageJson = {
145089
145089
  version
145090
145090
  };
@@ -150901,6 +150901,8 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
150901
150901
  }));
150902
150902
  }
150903
150903
  getNearestCursorPositionToMouseEvent(rowData, event, callback2) {
150904
+ var _a2;
150905
+ const isProtein2 = (_a2 = this.props.sequenceData) == null ? void 0 : _a2.isProtein;
150904
150906
  let nearestCaretPos = 0;
150905
150907
  let rowDomNode = this.linearView;
150906
150908
  rowDomNode = rowDomNode.querySelector(".veRowItem");
@@ -150914,11 +150916,11 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
150914
150916
  (clickXPositionRelativeToRowContainer + this.charWidth / 2) / this.charWidth
150915
150917
  );
150916
150918
  nearestCaretPos = numberOfBPsInFromRowStart + 0;
150917
- if (nearestCaretPos > maxEnd + 1) {
150918
- nearestCaretPos = maxEnd + 1;
150919
+ if (nearestCaretPos > maxEnd) {
150920
+ nearestCaretPos = isProtein2 ? maxEnd + 1 : maxEnd;
150919
150921
  }
150920
150922
  }
150921
- if (this.props.sequenceData && this.props.sequenceData.isProtein) {
150923
+ if (isProtein2) {
150922
150924
  nearestCaretPos = Math.round(nearestCaretPos / 3) * 3;
150923
150925
  }
150924
150926
  if (maxEnd === 0) nearestCaretPos = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teselagen/ove",
3
- "version": "0.8.28",
3
+ "version": "0.8.29",
4
4
  "main": "./src/index.js",
5
5
  "type": "module",
6
6
  "repository": "https://github.com/TeselaGen/tg-oss",
@@ -37,6 +37,7 @@ class _LinearView extends React.Component {
37
37
  bindOutsideChangeHelper = {};
38
38
  getNearestCursorPositionToMouseEvent(rowData, event, callback) {
39
39
  //loop through all the rendered rows to see if the click event lands in one of them
40
+ const isProtein = this.props.sequenceData?.isProtein;
40
41
  let nearestCaretPos = 0;
41
42
  let rowDomNode = this.linearView;
42
43
  rowDomNode = rowDomNode.querySelector(".veRowItem");
@@ -52,11 +53,11 @@ class _LinearView extends React.Component {
52
53
  this.charWidth
53
54
  );
54
55
  nearestCaretPos = numberOfBPsInFromRowStart + 0;
55
- if (nearestCaretPos > maxEnd + 1) {
56
- nearestCaretPos = maxEnd + 1;
56
+ if (nearestCaretPos > maxEnd) {
57
+ nearestCaretPos = isProtein ? maxEnd + 1 : maxEnd;
57
58
  }
58
59
  }
59
- if (this.props.sequenceData && this.props.sequenceData.isProtein) {
60
+ if (isProtein) {
60
61
  nearestCaretPos = Math.round(nearestCaretPos / 3) * 3;
61
62
  }
62
63
  if (maxEnd === 0) nearestCaretPos = 0;