-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement phylotree #144
Comments
Forked the web-components repo --> https://github.com/rispop/web-components |
Just added the lis-phylotree.ts file --> https://github.com/rispop/web-components/blob/main/src/lis-phylotree.ts. Would this be the correct format and have the correct dependencies? |
Good progress @rispop. I've emailed you about the format and whatnot. |
Created a test in /dev directory and have almost completed the component. One error regarding data still remains while compiling. Also fixed |
Sounds good. Let me know when you're ready for me try out your code. |
Finished component and test. The component prompts the user to enter a newick tree and then displays it. |
Great! I've added more items to the task list. |
Declared and exported Phylotree type |
Added the private _data state to LisPhylotree class |
Replaced input with tree and new type, implemented setter with conditions if tree is a string or a Phylotree. |
Also changed the drawing tree code to use _data, but for some reason, the tree doesn't display properly afterward. |
Fixed the tree display error by modifying the setter for the tree. Also fixed a couple of compile errors. |
Added 2nd |
Added optional color attribute |
Updated tree drawing code to color the nodes based on their attributes and updated Phylotree object to include some nodes with colors. |
Mind making the default color white? That's what the Funnotate implementation does and we want to replicate that. |
Yup, done. |
Adjusted width in drawing code to use screen.availWidth rather than a set value. |
Nevermind it looks like window.innerWidth is better to use as it makes the tree viewable in a windowed browser tab as well. |
The Funnotate implementation is at |
The layout property has been added and is used in the tree drawing code. |
Works great! Very cool that the tree automatically redraws if you change this property on an existing element. |
Added scale property and used in .scale method |
Clears the previous tree whenever it is redrawn using this.innerHTML = ""; |
Built query And variables Sorry the formating doesn't look right. |
Updated |
Completed GraphQL query and made pull-request. |
This is basically a second attempt at #10. @rispop is going to implement a phylotree component in an iterative manner. See the list below for steps and details:
src/
@property
) Newick tree using TnT (don't install TnT with npm; just include its scripts in the head of the page)dev/
directoryPhylotree
type before the LisPhylotree class that describes a phytotree object_data
state to the LisPhylotree classinput
property with atree
property that has typestring|Phylotree
and implement a setter for the property that saves the tree in the_data
state; you'll need to check if the tree is a string and parse it as Newick first_data
state<lis-phylotree>
element in thedev/
example and set its tree property to aPhylotree
object programmatically inside a<script>
tagcolor
string attribute to thePhylotree
typecolor
attribute if they have itPhylotree
object in thedev/
example to color some, but not all, nodeslayout
property to the component with type"vertical"|"radial"
with"vertical"
as the default value.layout
propertyscale
boolean property that's false by default.scale
methodgeneFamilies
query to fetch the Newick string for 1 phylotree. Be sure to set thepage
andpageSize
variables to 1 or else it's going to return results for all phylotrees in the database!dev/lis-linkout-element.html
as an example, use your GraphQL query from the previous step to updatedev/lis-phylotree.html
to get a phylotree with thegraphqlQuery
functiondev/lis-phylotree.html
to set thetree
property of the lis-phylotree-element programmaticallyphylotree
branch in the legumeinfo/web-components repoThe text was updated successfully, but these errors were encountered: