chrono-phylo-tree 1.0.8 → 1.0.10
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/README.md +15 -8
- package/package.json +2 -2
package/README.md
CHANGED
@@ -12,22 +12,28 @@ You can test and explore the functionality of the chrono-phylo-tree library by v
|
|
12
12
|
|
13
13
|
### Updates
|
14
14
|
|
15
|
-
|
15
|
+
#### 1.0.9
|
16
|
+
|
17
|
+
- Translation to German thanks to [u/Kneeerg](https://www.reddit.com/user/Kneeerg/)
|
18
|
+
|
19
|
+
- PhTree allows to execute functions when the mouse is over the buttons
|
20
|
+
|
21
|
+
#### 1.0.8
|
16
22
|
|
17
23
|
- Species class' step functions can include or not species whose `display` is `false`.
|
18
24
|
|
19
|
-
|
25
|
+
#### 1.0.7
|
20
26
|
|
21
27
|
- The default duration of the ancestors and descendants are the duration of the species
|
22
28
|
- MultiplePhTrees component allows to show the phylogenetic tree from multiple common ancestors
|
23
29
|
|
24
|
-
|
30
|
+
#### 1.0.5
|
25
31
|
|
26
32
|
- PhTree's lines' width can depend or not on the species' duration
|
27
33
|
- It's possible to know the steps until a species
|
28
34
|
- It's possible to count the maximum steps until the last descendant of a species
|
29
35
|
|
30
|
-
|
36
|
+
#### 1.0.2
|
31
37
|
|
32
38
|
- The duration of the species must be greater than 0
|
33
39
|
- Menu doesn't close when a function throws error
|
@@ -447,8 +453,9 @@ The `PhTree` component accepts the following props:
|
|
447
453
|
- **stroke**: `string` (optional, default: `"grey"`)The stroke color for the tree lines.
|
448
454
|
- **format**: `(n: number) => string` (optional, default: `(n) => n.toString()`)A function to format the display of time values.
|
449
455
|
- **chronoScale**: `boolean` (optional, default: `true`)If `true`, the width of the lines depend on the durection of the species.
|
456
|
+
- **handleMouseMove**: `(x: number, y: number) => void` (optional)a function that depends on the mouse position.
|
450
457
|
- **presentTime**: `number` (optional)The current time to highlight in the tree.
|
451
|
-
- **children**:`(species: Species, showMenu: boolean,toggleShowMenu: (species: Species) => void) => React.ReactNode` (optional) Render prop to customize the menu content.
|
458
|
+
- **children**:`(species: Species | undefined, showMenu: boolean, toggleShowMenu: (species: Species) => void, hoverSpecies: Species | undefined) => React.ReactNode` (optional) Render prop to customize the menu content.
|
452
459
|
|
453
460
|
### State
|
454
461
|
|
@@ -459,8 +466,8 @@ The `PhTree` component accepts the following props:
|
|
459
466
|
## Methods
|
460
467
|
|
461
468
|
- **toggleShowMenu**: `(species: Species) => void`Toggles the visibility of the menu for a given species.
|
462
|
-
- **toggleShowDesc**: `(species: Species) => void`
|
463
|
-
|
469
|
+
- **toggleShowDesc**: `(species: Species) => void`Toggles the visibility of descendants for a given species, if `false`, its `descendants` won't be displayed and the `line` will extend until its `absoluteExtinction()`.
|
470
|
+
- **hoverShowMenu**: `(sp: Species | undefined) => void`Toggles the visibility of info about the species
|
464
471
|
|
465
472
|
### Rendering
|
466
473
|
|
@@ -504,7 +511,7 @@ The `MultiplePhTrees` component accepts the following props:
|
|
504
511
|
|
505
512
|
- **presentTime**: `number` (optional) - The current time to highlight in the tree.
|
506
513
|
|
507
|
-
- **children**: `(species: Species, showMenu: boolean, toggleShowMenu: (species: Species) => void) => React.ReactNode` (optional) - Render prop to customize the menu content.
|
514
|
+
- **children**: `(species: Species | undefined, showMenu: boolean, toggleShowMenu: (species: Species) => void) => React.ReactNode` (optional) - Render prop to customize the menu content.
|
508
515
|
|
509
516
|
### Rendering
|
510
517
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "chrono-phylo-tree",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.10",
|
4
4
|
"description": "A React-based phylogenetic tree visualization library",
|
5
5
|
"type": "module",
|
6
6
|
"main": "dist/index.js",
|
@@ -36,7 +36,7 @@
|
|
36
36
|
},
|
37
37
|
"repository": {
|
38
38
|
"type": "git",
|
39
|
-
"url": "https://github.com/LUCHER4321/
|
39
|
+
"url": "https://github.com/LUCHER4321/chrono-phylo-tree"
|
40
40
|
},
|
41
41
|
"keywords": ["phylogenetic", "tree", "visualization", "react"],
|
42
42
|
"author": "LUCHER4321"
|