react-msaview 9.3.0 → 9.5.0

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/src/model.ts CHANGED
@@ -280,7 +280,6 @@ export const preservedOnReset = new Set([
280
280
  'drawNodeBubbles',
281
281
  'drawNodeLabels',
282
282
  'showTreeOverview',
283
- 'showTreeScaleBar',
284
283
  'overviewHeight',
285
284
  'turnedOffTracks',
286
285
  'trackHeights',
@@ -2934,14 +2933,11 @@ function stateModelFactory({
2934
2933
  .views(self => ({
2935
2934
  /**
2936
2935
  * #getter
2937
- * the branch-length scale bar over the tree, undefined while
2938
- * `showTreeScaleBar` is off, in cladogram mode, or when the tree area is
2939
- * too narrow for one
2936
+ * the branch-length scale bar over the tree, the guide of its branch-length
2937
+ * scale: undefined in cladogram mode, with the tree off, or when the tree
2938
+ * area is too narrow for one
2940
2939
  */
2941
2940
  get treeScaleBar() {
2942
- if (!self.showTreeScaleBar) {
2943
- return undefined
2944
- }
2945
2941
  return scaleBarLength(
2946
2942
  self.pxPerBranchLength,
2947
2943
  self.effectiveTreeAreaWidth - self.marginLeft * 2,
@@ -3595,12 +3591,20 @@ function stateModelFactory({
3595
3591
  /**
3596
3592
  * #getter
3597
3593
  * categorical feature types (InterPro domains and the like) that each get
3598
- * their own color and a legend entry
3594
+ * their own color and a legend entry, in palette order: grouped by
3595
+ * feature type, types in the order they first appear. A GenPept
3596
+ * record's CDD Sites follow every Region, so the palette spends the
3597
+ * colors after the domains' on the sites inside them
3599
3598
  */
3600
3599
  get categoricalDomainTypes() {
3601
- return [...self.annotationTypes.values()].filter(
3600
+ const types = [...self.annotationTypes.values()].filter(
3602
3601
  d => !segmentFeatureTypes.has(d.featureType ?? ''),
3603
3602
  )
3603
+ const typeOrder = [...new Set(types.map(d => d.featureType))]
3604
+ return types.toSorted(
3605
+ (a, b) =>
3606
+ typeOrder.indexOf(a.featureType) - typeOrder.indexOf(b.featureType),
3607
+ )
3604
3608
  },
3605
3609
  get fillPalette() {
3606
3610
  const segments = Object.fromEntries(
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '9.3.0'
1
+ export const version = '9.5.0'