@teselagen/ove 0.8.38 → 0.8.39

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
@@ -98096,13 +98096,13 @@ function addCustomEnzyme(newEnz) {
98096
98096
  );
98097
98097
  }
98098
98098
  __name(addCustomEnzyme, "addCustomEnzyme");
98099
- function pareDownAnnotations(annotations, max2) {
98099
+ function pareDownAnnotations(annotations, max2, sequenceLength) {
98100
98100
  let annotationsToPass = annotations;
98101
98101
  let paredDown = false;
98102
98102
  if (Object.keys(annotations).length > max2) {
98103
98103
  paredDown = true;
98104
98104
  const sortedAnnotations = sortBy$1(annotations, function(annotation) {
98105
- return -getRangeLength(annotation);
98105
+ return -getRangeLength(annotation, sequenceLength);
98106
98106
  });
98107
98107
  annotationsToPass = sortedAnnotations.slice(0, max2).reduce(function(obj, item) {
98108
98108
  obj[item.id] = item;
@@ -117245,7 +117245,7 @@ function showFileDialog({ multiple = false, onSelect }) {
117245
117245
  input.click();
117246
117246
  }
117247
117247
  __name(showFileDialog, "showFileDialog");
117248
- const version = "0.8.38";
117248
+ const version = "0.8.39";
117249
117249
  const packageJson = {
117250
117250
  version
117251
117251
  };
@@ -124643,7 +124643,8 @@ const __LinearView = class __LinearView extends React.Component {
124643
124643
  const maxToShow = (maxAnnotationsToDisplay ? maxAnnotationsToDisplay[type2] : limits[type2]) || 50;
124644
124644
  const [annotations, paredDown] = pareDownAnnotations(
124645
124645
  sequenceData2["filtered" + nameUpper] || sequenceData2[type2] || {},
124646
- maxToShow
124646
+ maxToShow,
124647
+ sequenceData2.sequence ? sequenceData2.sequence.length : sequenceData2.size || 0
124647
124648
  );
124648
124649
  if (paredDown) {
124649
124650
  this.paredDownMessages.push(
@@ -124933,7 +124934,7 @@ const __LinearView = class __LinearView extends React.Component {
124933
124934
  fullSequence: sequenceData2.sequence,
124934
124935
  emptyText: getEmptyText({ sequenceData: sequenceData2, caretPosition: caretPosition2 }),
124935
124936
  tickSpacing: tickSpacingToUse,
124936
- annotationVisibility: __spreadValues(__spreadValues(__spreadValues({}, rest.annotationVisibility), (!isLinViewZoomed || this.charWidth < 5) && {
124937
+ annotationVisibility: __spreadValues(__spreadValues(__spreadValues({}, rest.annotationVisibility), (!isLinViewZoomed || this.charWidth < 5) && bpsPerRow >= 50 && {
124937
124938
  translations: false,
124938
124939
  primaryProteinSequence: false,
124939
124940
  reverseSequence: false,
@@ -126834,7 +126835,7 @@ function CircularView(props) {
126834
126835
  }
126835
126836
  const innerRadius = radius - 10;
126836
126837
  const initialRadius = radius;
126837
- const showSeq = isZoomedIn && rangeToShowLength < 140;
126838
+ const showSeq = rangeToShowLength < 140 && (isZoomedIn || sequenceLength < 50);
126838
126839
  const showSeqText = rangeToShowLength < 80;
126839
126840
  const layersToDraw = [
126840
126841
  { zIndex: 10, layerName: "sequenceChars" },
@@ -127087,7 +127088,7 @@ function CircularView(props) {
127087
127088
  }
127088
127089
  );
127089
127090
  const maxToShow = !isZoomedIn && ((maxAnnotationsToDisplay ? maxAnnotationsToDisplay[layerName] : limits[layerName]) || 50);
127090
- const [trimmedAndParedAnns, paredDown] = maxToShow ? pareDownAnnotations(trimmedAnnotations, maxToShow) : [trimmedAnnotations];
127091
+ const [trimmedAndParedAnns, paredDown] = maxToShow ? pareDownAnnotations(trimmedAnnotations, maxToShow, sequenceLength) : [trimmedAnnotations];
127091
127092
  if (paredDown) {
127092
127093
  paredDownMessages.push(
127093
127094
  getParedDownWarning({
package/index.es.js CHANGED
@@ -98078,13 +98078,13 @@ function addCustomEnzyme(newEnz) {
98078
98078
  );
98079
98079
  }
98080
98080
  __name(addCustomEnzyme, "addCustomEnzyme");
98081
- function pareDownAnnotations(annotations, max2) {
98081
+ function pareDownAnnotations(annotations, max2, sequenceLength) {
98082
98082
  let annotationsToPass = annotations;
98083
98083
  let paredDown = false;
98084
98084
  if (Object.keys(annotations).length > max2) {
98085
98085
  paredDown = true;
98086
98086
  const sortedAnnotations = sortBy$1(annotations, function(annotation) {
98087
- return -getRangeLength(annotation);
98087
+ return -getRangeLength(annotation, sequenceLength);
98088
98088
  });
98089
98089
  annotationsToPass = sortedAnnotations.slice(0, max2).reduce(function(obj, item) {
98090
98090
  obj[item.id] = item;
@@ -117227,7 +117227,7 @@ function showFileDialog({ multiple = false, onSelect }) {
117227
117227
  input.click();
117228
117228
  }
117229
117229
  __name(showFileDialog, "showFileDialog");
117230
- const version = "0.8.38";
117230
+ const version = "0.8.39";
117231
117231
  const packageJson = {
117232
117232
  version
117233
117233
  };
@@ -124625,7 +124625,8 @@ const __LinearView = class __LinearView extends React__default.Component {
124625
124625
  const maxToShow = (maxAnnotationsToDisplay ? maxAnnotationsToDisplay[type2] : limits[type2]) || 50;
124626
124626
  const [annotations, paredDown] = pareDownAnnotations(
124627
124627
  sequenceData2["filtered" + nameUpper] || sequenceData2[type2] || {},
124628
- maxToShow
124628
+ maxToShow,
124629
+ sequenceData2.sequence ? sequenceData2.sequence.length : sequenceData2.size || 0
124629
124630
  );
124630
124631
  if (paredDown) {
124631
124632
  this.paredDownMessages.push(
@@ -124915,7 +124916,7 @@ const __LinearView = class __LinearView extends React__default.Component {
124915
124916
  fullSequence: sequenceData2.sequence,
124916
124917
  emptyText: getEmptyText({ sequenceData: sequenceData2, caretPosition: caretPosition2 }),
124917
124918
  tickSpacing: tickSpacingToUse,
124918
- annotationVisibility: __spreadValues(__spreadValues(__spreadValues({}, rest.annotationVisibility), (!isLinViewZoomed || this.charWidth < 5) && {
124919
+ annotationVisibility: __spreadValues(__spreadValues(__spreadValues({}, rest.annotationVisibility), (!isLinViewZoomed || this.charWidth < 5) && bpsPerRow >= 50 && {
124919
124920
  translations: false,
124920
124921
  primaryProteinSequence: false,
124921
124922
  reverseSequence: false,
@@ -126816,7 +126817,7 @@ function CircularView(props) {
126816
126817
  }
126817
126818
  const innerRadius = radius - 10;
126818
126819
  const initialRadius = radius;
126819
- const showSeq = isZoomedIn && rangeToShowLength < 140;
126820
+ const showSeq = rangeToShowLength < 140 && (isZoomedIn || sequenceLength < 50);
126820
126821
  const showSeqText = rangeToShowLength < 80;
126821
126822
  const layersToDraw = [
126822
126823
  { zIndex: 10, layerName: "sequenceChars" },
@@ -127069,7 +127070,7 @@ function CircularView(props) {
127069
127070
  }
127070
127071
  );
127071
127072
  const maxToShow = !isZoomedIn && ((maxAnnotationsToDisplay ? maxAnnotationsToDisplay[layerName] : limits[layerName]) || 50);
127072
- const [trimmedAndParedAnns, paredDown] = maxToShow ? pareDownAnnotations(trimmedAnnotations, maxToShow) : [trimmedAnnotations];
127073
+ const [trimmedAndParedAnns, paredDown] = maxToShow ? pareDownAnnotations(trimmedAnnotations, maxToShow, sequenceLength) : [trimmedAnnotations];
127073
127074
  if (paredDown) {
127074
127075
  paredDownMessages.push(
127075
127076
  getParedDownWarning({
package/index.umd.js CHANGED
@@ -126244,13 +126244,13 @@ ${seq.sequence}
126244
126244
  );
126245
126245
  }
126246
126246
  __name(addCustomEnzyme, "addCustomEnzyme");
126247
- function pareDownAnnotations(annotations, max2) {
126247
+ function pareDownAnnotations(annotations, max2, sequenceLength) {
126248
126248
  let annotationsToPass = annotations;
126249
126249
  let paredDown = false;
126250
126250
  if (Object.keys(annotations).length > max2) {
126251
126251
  paredDown = true;
126252
126252
  const sortedAnnotations = sortBy$1(annotations, function(annotation) {
126253
- return -getRangeLength(annotation);
126253
+ return -getRangeLength(annotation, sequenceLength);
126254
126254
  });
126255
126255
  annotationsToPass = sortedAnnotations.slice(0, max2).reduce(function(obj, item) {
126256
126256
  obj[item.id] = item;
@@ -145343,7 +145343,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
145343
145343
  input.click();
145344
145344
  }
145345
145345
  __name(showFileDialog, "showFileDialog");
145346
- const version = "0.8.38";
145346
+ const version = "0.8.39";
145347
145347
  const packageJson = {
145348
145348
  version
145349
145349
  };
@@ -151139,7 +151139,8 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
151139
151139
  const maxToShow = (maxAnnotationsToDisplay ? maxAnnotationsToDisplay[type2] : limits[type2]) || 50;
151140
151140
  const [annotations, paredDown] = pareDownAnnotations(
151141
151141
  sequenceData2["filtered" + nameUpper] || sequenceData2[type2] || {},
151142
- maxToShow
151142
+ maxToShow,
151143
+ sequenceData2.sequence ? sequenceData2.sequence.length : sequenceData2.size || 0
151143
151144
  );
151144
151145
  if (paredDown) {
151145
151146
  this.paredDownMessages.push(
@@ -151429,7 +151430,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
151429
151430
  fullSequence: sequenceData2.sequence,
151430
151431
  emptyText: getEmptyText({ sequenceData: sequenceData2, caretPosition: caretPosition2 }),
151431
151432
  tickSpacing: tickSpacingToUse,
151432
- annotationVisibility: __spreadValues(__spreadValues(__spreadValues({}, rest.annotationVisibility), (!isLinViewZoomed || this.charWidth < 5) && {
151433
+ annotationVisibility: __spreadValues(__spreadValues(__spreadValues({}, rest.annotationVisibility), (!isLinViewZoomed || this.charWidth < 5) && bpsPerRow >= 50 && {
151433
151434
  translations: false,
151434
151435
  primaryProteinSequence: false,
151435
151436
  reverseSequence: false,
@@ -153330,7 +153331,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
153330
153331
  }
153331
153332
  const innerRadius = radius - 10;
153332
153333
  const initialRadius = radius;
153333
- const showSeq = isZoomedIn && rangeToShowLength < 140;
153334
+ const showSeq = rangeToShowLength < 140 && (isZoomedIn || sequenceLength < 50);
153334
153335
  const showSeqText = rangeToShowLength < 80;
153335
153336
  const layersToDraw = [
153336
153337
  { zIndex: 10, layerName: "sequenceChars" },
@@ -153583,7 +153584,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
153583
153584
  }
153584
153585
  );
153585
153586
  const maxToShow = !isZoomedIn && ((maxAnnotationsToDisplay ? maxAnnotationsToDisplay[layerName] : limits[layerName]) || 50);
153586
- const [trimmedAndParedAnns, paredDown] = maxToShow ? pareDownAnnotations(trimmedAnnotations, maxToShow) : [trimmedAnnotations];
153587
+ const [trimmedAndParedAnns, paredDown] = maxToShow ? pareDownAnnotations(trimmedAnnotations, maxToShow, sequenceLength) : [trimmedAnnotations];
153587
153588
  if (paredDown) {
153588
153589
  paredDownMessages.push(
153589
153590
  getParedDownWarning({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teselagen/ove",
3
- "version": "0.8.38",
3
+ "version": "0.8.39",
4
4
  "main": "./src/index.js",
5
5
  "type": "module",
6
6
  "repository": "https://github.com/TeselaGen/tg-oss",
@@ -241,7 +241,8 @@ export function CircularView(props) {
241
241
  }
242
242
  const innerRadius = radius - 10;
243
243
  const initialRadius = radius;
244
- const showSeq = isZoomedIn && rangeToShowLength < 140;
244
+ const showSeq =
245
+ rangeToShowLength < 140 && (isZoomedIn || sequenceLength < 50);
245
246
  const showSeqText = rangeToShowLength < 80;
246
247
 
247
248
  //RENDERING CONCEPTS:
@@ -521,7 +522,7 @@ export function CircularView(props) {
521
522
  : limits[layerName]) ||
522
523
  50);
523
524
  const [trimmedAndParedAnns, paredDown] = maxToShow
524
- ? pareDownAnnotations(trimmedAnnotations, maxToShow)
525
+ ? pareDownAnnotations(trimmedAnnotations, maxToShow, sequenceLength)
525
526
  : [trimmedAnnotations];
526
527
 
527
528
  if (paredDown) {
@@ -118,7 +118,10 @@ class _LinearView extends React.Component {
118
118
  : limits[type]) || 50;
119
119
  const [annotations, paredDown] = pareDownAnnotations(
120
120
  sequenceData["filtered" + nameUpper] || sequenceData[type] || {},
121
- maxToShow
121
+ maxToShow,
122
+ sequenceData.sequence
123
+ ? sequenceData.sequence.length
124
+ : sequenceData.size || 0
122
125
  );
123
126
 
124
127
  if (paredDown) {
@@ -363,13 +366,14 @@ class _LinearView extends React.Component {
363
366
  tickSpacing: tickSpacingToUse,
364
367
  annotationVisibility: {
365
368
  ...rest.annotationVisibility,
366
- ...((!isLinViewZoomed || this.charWidth < 5) && {
367
- translations: false,
368
- primaryProteinSequence: false,
369
- reverseSequence: false,
370
- sequence: false,
371
- cutsitesInSequence: false
372
- }),
369
+ ...((!isLinViewZoomed || this.charWidth < 5) &&
370
+ bpsPerRow >= 50 && {
371
+ translations: false,
372
+ primaryProteinSequence: false,
373
+ reverseSequence: false,
374
+ sequence: false,
375
+ cutsitesInSequence: false
376
+ }),
373
377
  ...annotationVisibilityOverrides
374
378
  },
375
379
  ...RowItemProps
@@ -111,13 +111,13 @@ export function addCustomEnzyme(newEnz) {
111
111
  );
112
112
  }
113
113
 
114
- export function pareDownAnnotations(annotations, max) {
114
+ export function pareDownAnnotations(annotations, max, sequenceLength) {
115
115
  let annotationsToPass = annotations;
116
116
  let paredDown = false;
117
117
  if (Object.keys(annotations).length > max) {
118
118
  paredDown = true;
119
119
  const sortedAnnotations = sortBy(annotations, function (annotation) {
120
- return -getRangeLength(annotation);
120
+ return -getRangeLength(annotation, sequenceLength);
121
121
  });
122
122
  annotationsToPass = sortedAnnotations.slice(0, max).reduce(function (
123
123
  obj,
@@ -21,7 +21,7 @@ export function getEmptyText({ sequenceData, caretPosition }: {
21
21
  export function tryToRefocusEditor(): void;
22
22
  export function getCustomEnzymes(): any;
23
23
  export function addCustomEnzyme(newEnz: any): void;
24
- export function pareDownAnnotations(annotations: any, max: any): any[];
24
+ export function pareDownAnnotations(annotations: any, max: any, sequenceLength: any): any[];
25
25
  export function getParedDownWarning({ nameUpper, maxToShow, isAdjustable }: {
26
26
  nameUpper: any;
27
27
  maxToShow: any;