-
Notifications
You must be signed in to change notification settings - Fork 64
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
Add Callback, new tip position & more parameters.. #9
base: master
Are you sure you want to change the base?
Conversation
onMouseOut: function(circle, tip){console.log("you mouse out :"+tip.text())} | ||
}); | ||
|
||
TimeKnots.draw("#timeline1_1", kurbickFilms, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all, thanks for your PR!
I'm curious why this timeknot does not make the tip dissapear, when moving the pointer out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need this feature to include a timeline in my CV. It look better in my CV's design :)
@@ -72,8 +82,7 @@ | |||
{name:"Watch a movie", date: "2012-09-28T20:16:00"}, | |||
{name:"Go to sleep", date: "2012-09-28T23:00:00"} | |||
]; | |||
TimeKnots.draw("#timeline2", mySchedule, {horizontalLayout: false, color: "#669", height: 450, width:200, showLabels: true, labelFormat:"%H:%M"}); | |||
|
|||
TimeKnots.draw("#timeline2", mySchedule, {horizontalLayout: false, colorTimeline: "#669", height: 450, width:200, showLabels: true, labelFormat:"%H:%M"}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also curious why this timeknow seem to move the tip to (0,0) when dissapearing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's seem a bug... I don't know why it appear. For me, on IE11 it appear average 1/10 times..
Why don't you accept my PR? Do you need some modifications? |
@madeinjs Do you happen to have an example that shows off the new options in this PR? thanks! |
@pchaganti , I already changed examples placed in example/index.html with new options. |
@madeinjs Found them. Thx! |
+1 |
Hello,
I used your library on my personal project. This really helped me but I needed some Knot callbacks. So I fork your project and improve it to fit more to my need. Here improvement
add Knot Callback (as proposed in my last PR)
I simply add basic callback parameters when you draw your
TimeKnots
. Bellow a very simple example:fixed tip position
In this mode, Tip are continously showed up on the top of the timeline and hover a circle update it. You have only to set
tipPosition
parameter totop
.add more visual parameters
I separate color in categories : Timeline, Tip & Circle. Here parameters
colorTimeline
: color used for the Timeline (default:999
)colorTip
: color used for text visualization (default:rgba(0,0,0,.5)
)backgroundCircle
: Background color of the circle (default:FFF
)backgroundTip
: Background color of the tip (default:{0,0,0,.5}
)Factorize your code
I found many repettions and I foctorize it in function
I hope you'll accept this PR & this work will serve someone!