-
Notifications
You must be signed in to change notification settings - Fork 27
Refactor draw_geom() and turn into a Geom class for scalability
#107
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
base: master
Are you sure you want to change the base?
Conversation
|
looks like a good start, thanks for sharing. |
|
Hi @tdhock , I am trying to understand the logic behind animint2/inst/htmljs/animint.js Lines 1224 to 1232 in 3b8dc69
The second time, they are part of an if-else clause, where their behavior changes when the geom type is one of the following: line, path, ribbon, or polygon. animint2/inst/htmljs/animint.js Lines 1340 to 1348 in 3b8dc69
I've experimented with an animint viz using the animint2/inst/htmljs/animint.js Lines 1248 to 1252 in 3b8dc69
Do you recall the logic behind this? Thanks. |
|
Hi Yufan, thanks for asking about key vs id. id_fun is used to assign the HTML id property using this JS code, the reason why they are defined twice, is becuase there are two cases, based on whether the geom is grouped (path, ribbon, or polygon) or not (others). The first definition |
|
Thanks a lot for the detailed explanation! It is definitely helpful for me, and I love the idea of creating virtual classes for group and ungroup geoms. |
|
If I understand correctly, group geoms are those |
…a()` into subclass method
…s with base class
|
hi @Faye-yufan when you get some time, can you please try to merge new master into this branch and resolve conflicts? There are some substantial new changes which I merged into master recently, which remove some duplicated logic in animint.js and so would be complementary to the OO/class re-organization you have been working on in this branch. |
|
@tdhock Thank you for modifying the logic, it helps a lot! I'm working on it now. |
|
Here are some notes for myself, please correct me if I'm wrong -
|
|
yes the .variable suffix comes from animint (not 2) which required users to specify I believe the |
Overview
This PR aims to refactor the existing
draw_geomfunction, turning some procedure and functional code into class methods. The changes improve the code scalability, particularly when we want to implement new features on the renderer side.This PR is critical for future developments of issue #48
Changes
TODO
selected_funs, as we discussed previously.