@teselagen/ove 0.3.56 → 0.3.58

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teselagen/ove",
3
- "version": "0.3.56",
3
+ "version": "0.3.58",
4
4
  "main": "./src/index.js",
5
5
  "exports": {
6
6
  ".": {
@@ -15,8 +15,8 @@
15
15
  "dependencies": {
16
16
  "@teselagen/sequence-utils": "0.3.13",
17
17
  "@teselagen/range-utils": "0.3.7",
18
- "@teselagen/ui": "0.3.44",
19
- "@teselagen/file-utils": "0.3.9",
18
+ "@teselagen/ui": "0.3.48",
19
+ "@teselagen/file-utils": "0.3.11",
20
20
  "@teselagen/bounce-loader": "0.3.11",
21
21
  "@teselagen/bio-parsers": "0.4.7",
22
22
  "@blueprintjs/core": "3.52.0",
@@ -2,7 +2,7 @@ import React from "react";
2
2
 
3
3
  export function SequenceName({ sequenceName, sequenceLength, isProtein }) {
4
4
  return (
5
- <div key="circViewSvgCenterText" style={{ textAlign: "center" }}>
5
+ <div key="sequenceNameText" className="sequenceNameText">
6
6
  <span>{sequenceName} </span>
7
7
  <br />
8
8
  <span>
@@ -5,7 +5,10 @@
5
5
  .veLinearView.isLinViewZoomed .veRowItemWrapper {
6
6
  overflow: auto;
7
7
  }
8
-
8
+ .sequenceNameText {
9
+ text-align: center;
10
+ padding-top: 20px;
11
+ }
9
12
  /* .tg-pinch-helper {
10
13
  touch-action: none;
11
14
  -moz-user-select: none;
@@ -88,6 +88,7 @@ const Axis = function (props) {
88
88
  tickMarkSVG.push(
89
89
  <rect
90
90
  className="veAxisTick"
91
+ data-test={tickMarkPosition + 1}
91
92
  key={"axisTickMarkPath " + i + " " + tickMarkPosition}
92
93
  x={xCenter}
93
94
  width={1}
@@ -104,7 +104,7 @@ export const collapseSplitScreen = (activePanelId, meta) => {
104
104
  // ------------------------------------
105
105
  // Reducer
106
106
  // ------------------------------------
107
- export default createReducer(
107
+ const reducer = createReducer(
108
108
  {
109
109
  [addPanelIfItDoesntAlreadyExist]: (state, panelToAdd) => {
110
110
  if (
@@ -140,8 +140,16 @@ export default createReducer(
140
140
  if (id === idToClose) indexToClose = i;
141
141
  });
142
142
  if (indexToClose > -1) {
143
- return removeItem(group, indexToClose).map((tab, i) => {
144
- if (i === 0) return { ...tab, active: true };
143
+ const newPanels = removeItem(group, indexToClose);
144
+ let mostRecentIndex = 0;
145
+ newPanels.forEach(p => {
146
+ if (p.lastActive > newPanels[mostRecentIndex].lastActive) {
147
+ mostRecentIndex = newPanels.indexOf(p);
148
+ }
149
+ });
150
+
151
+ return newPanels.map((tab, i) => {
152
+ if (i === mostRecentIndex) return { ...tab, active: true };
145
153
  else {
146
154
  return tab;
147
155
  }
@@ -258,6 +266,17 @@ export default createReducer(
258
266
  ]
259
267
  );
260
268
 
269
+ export default (state, action) => {
270
+ const nextState = reducer(state, action);
271
+ nextState.forEach(pg => {
272
+ pg.forEach(p => {
273
+ if (p.active) {
274
+ p.lastActive = Date.now().toString();
275
+ }
276
+ });
277
+ });
278
+ return nextState;
279
+ };
261
280
  function flipActiveForGroup(group, setCircActive) {
262
281
  const activeTab = group.find(({ active }) => active);
263
282
  if (activeTab?.id === (setCircActive ? "rail" : "circular")) {
package/style.css CHANGED
@@ -9546,9 +9546,9 @@ body:not(.drag-active)
9546
9546
  .tg-dropdown-cell-edit-container .bp3-tag-input .bp3-button {
9547
9547
  margin: 0;
9548
9548
  }
9549
- .tg-dropdown-cell-edit-container .bp3-tag-input .bp3-tag-input-values > * {
9549
+ /* .tg-dropdown-cell-edit-container .bp3-tag-input .bp3-tag-input-values > * {
9550
9550
  margin-bottom: 0;
9551
- }
9551
+ } */
9552
9552
  .tg-dropdown-cell-edit-container:not(.tg-dropdown-cell-edit-container-multi)
9553
9553
  .bp3-tag-input {
9554
9554
  min-height: 0;
@@ -10958,7 +10958,10 @@ li.bp3-menu-divider:last-child {
10958
10958
  .veLinearView.isLinViewZoomed .veRowItemWrapper {
10959
10959
  overflow: auto;
10960
10960
  }
10961
-
10961
+ .sequenceNameText {
10962
+ text-align: center;
10963
+ padding-top: 20px;
10964
+ }
10962
10965
  /* .tg-pinch-helper {
10963
10966
  touch-action: none;
10964
10967
  -moz-user-select: none;