@teselagen/ove 0.7.14 → 0.7.15

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.7.14",
3
+ "version": "0.7.15",
4
4
  "main": "./src/index.js",
5
5
  "exports": {
6
6
  ".": {
@@ -60,7 +60,6 @@
60
60
  "mock-fs": "5.2.0",
61
61
  "nanoid": "^4.0.0",
62
62
  "node-interval-tree": "^1.3.3",
63
- "papaparse": "5.3.2",
64
63
  "paths-js": "^0.4.11",
65
64
  "pluralize": "^7.0.0",
66
65
  "popper.js": "^1.16.1",
@@ -12,16 +12,17 @@ export function RotateCircularViewSlider({
12
12
  smallSlider,
13
13
  editorName
14
14
  }) {
15
+ const mainSelector = editorName ? `.veEditor.${editorName}` : ".veEditor";
15
16
  const target = React.useRef();
16
17
  const svgEleRef = React.useRef();
17
18
 
18
19
  useEffect(() => {
19
20
  // use document.querySelector so that the code can still work after changing the parent node of this component
20
21
  const svgEle = document
21
- .querySelector(`.veEditor.${editorName}`)
22
+ .querySelector(mainSelector)
22
23
  ?.querySelector(".veCircularView .circularViewSvg");
23
24
  svgEleRef.current = svgEle;
24
- }, [editorName]);
25
+ }, [editorName, mainSelector]);
25
26
 
26
27
  const showLabelsDebounced = useDebouncedCallback(
27
28
  el => {
@@ -56,10 +57,11 @@ export function RotateCircularViewSlider({
56
57
  const val = 360 - _val;
57
58
  if (!svgEleRef.current) {
58
59
  svgEleRef.current = document
59
- .querySelector(`.veEditor.${editorName}`)
60
+ .querySelector(mainSelector)
60
61
  ?.querySelector(".veCircularView .circularViewSvg");
61
62
  }
62
63
  const el = svgEleRef.current;
64
+ if (!el) return;
63
65
  const innerEl = el?.querySelector("g");
64
66
  innerEl.style.transform = `rotate(${val}deg)`;
65
67
  setRotationRadians((val * Math.PI) / 180);
@@ -46,7 +46,8 @@ export default props => {
46
46
  withFullscreen,
47
47
  selectionLayer,
48
48
  selectionLayerUpdate,
49
- caretPositionUpdate
49
+ caretPositionUpdate,
50
+ editorName = "tg-simple-dna-view"
50
51
  } = props;
51
52
  const [previewType, setPreviewType] = useState(
52
53
  _sequenceData.circular ? "circular" : "linear"
@@ -216,7 +217,7 @@ export default props => {
216
217
  <Component
217
218
  {...{
218
219
  showCicularViewInternalLabels: true,
219
- className: "tg-simple-dna-view veEditor",
220
+ className: `${editorName} veEditor tg-simple-dna-view`,
220
221
  width: 300,
221
222
  height: 300,
222
223
  noWarnings,
package/Menlo.ttf DELETED
Binary file
package/Monaco.ttf DELETED
Binary file