Skip to content
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

Tyxml combinators #12

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Tyxml combinators #12

wants to merge 6 commits into from

Conversation

Drup
Copy link
Contributor

@Drup Drup commented Oct 24, 2015

First two commits are from #10

It seems that this iteration of the interface doesn't explode too easily, so there we go!

It handles both usual selection and enter selection (with a hack). It allows both to put tyxml in d3 and d3 in tyxml (although you can break typing that way, see later).

The way to use this is the following: you create a function producing tyxml elements depending on data. Both the elements and the layout can change depending on the data. Deep hierarchy works fine.

let f data i = ....

Then you turn it into a d3 element: d3 f

At the moment, since tyxml element don't carry the type of data with them, it's possible to break typing by doing : d3 (inject ...). I'm not sure how I feel about that ...

@Drup
Copy link
Contributor Author

Drup commented Oct 24, 2015

Note that there is a bug I don't understand in Drup@439b301
It only colors one rectangle, not all of them.

@seliopou
Copy link
Owner

I'm gonna take a look at this later tonight or tomorrow.

@seliopou
Copy link
Owner

Might be "getting" tyxml a bit more after browsing this. More soon.

@Drup
Copy link
Contributor Author

Drup commented Oct 25, 2015

Note that the example is quite contrived on purpose (in order to test both inject and d3).

Drup added 2 commits November 7, 2015 14:07
Put the unsafe version in an Unsafe module.
@Drup
Copy link
Contributor Author

Drup commented Nov 7, 2015

Rebased.

@Drup
Copy link
Contributor Author

Drup commented Nov 7, 2015

In fact, the enter stuff doesn't really work and I can't manage to fix it properly. I tried to use append but without success. Do you have any propositions ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants