This repository was archived by the owner on Jul 1, 2025. It is now read-only.
adds classes to .d3plus-timeline based on presentation type#46
Open
cnavarreteliz wants to merge 2 commits intomainfrom
Open
adds classes to .d3plus-timeline based on presentation type#46cnavarreteliz wants to merge 2 commits intomainfrom
cnavarreteliz wants to merge 2 commits intomainfrom
Conversation
davelandry
suggested changes
Oct 15, 2018
src/Timeline.js
Outdated
|
|
||
| this._brushGroup = elem("g.brushGroup", {parent: this._group}); | ||
| this._brushGroup.call(brush).transition(this._transition) | ||
| .attr("class", this._buttonBehaviorCurrent === "buttons" ? "d3plus-timeline-buttons" : "d3plus-timeline-ticks") |
Member
There was a problem hiding this comment.
This logic does not work on re-renders, as you are changing the class from "brushGroup" to "d3plus-timeline-*", so that on re-render the selection for "g.brushGroup" will not work and it will create another group.
- Set the class to either "brushGroup buttons" or "brushGroup ticks".
- Move this attr setting before the previous transition (there can be funky behavior when transitioning a property that cannot be transitioned, like "class").
Author
There was a problem hiding this comment.
@davelandry I found a possible solution. The wrapper of the timeline by default is ticks. If we replace the class of ticks by buttons|ticks we'd solve the issue.
elem("g.ticks", {parent: this._group}).attr("class", this._buttonBehaviorCurrent);
I was testing and the shapes that we need to wrap don't related with brushGroup
Has it sense for you?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes d3plus/d3plus#747
Types of changes
Checklist