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

Enable 'object constancy' on data refresh by supporting a key function in Dataset #2801

Closed
wants to merge 27 commits into from

Conversation

softwords
Copy link

see issue #2512
This pull request

  • adds the key function to Dataset
  • uses this key in Drawer when binding data to the selection
  • provides 2 predefined keys:
    -- NoConstancy - which will return a new value each time it is called, therefire ensuring that there is never object constancy; that is, all elements in the selection are removed and recreated
    -- ByIndex - returns the index of the datum n the array, which is the default behaviour of d3 anyway
  • Also removes the logic on AnimateOnNextRender in ScatterPlot. This logic simulates the destruction and recreation of each svg element to create an animation effect. But, if the NoConstancy key is used, d3 destroys and recreates the svg elements itself, so there is no need for this workaround.
    This also resolves issue Animator behavior can be altered by calling datasets.data() ??? #2707.

@bluong
Copy link
Contributor

bluong commented Sep 23, 2015

@softwords
There seems to be a lot of drastic whitespace changes (due to indentation, seemingly). Can you change the pull request such that the tabs stay consistent with the rest of the code base?

@bluong bluong self-assigned this Sep 23, 2015
@softwords
Copy link
Author

@bluong; >>drastic whitespace changes
yes I can see this now - it's a bit of a mess. I think the simplest path may be to start over

@softwords softwords closed this Sep 24, 2015
@softwords softwords deleted the DatasetKey branch September 24, 2015 15:23
@bluong
Copy link
Contributor

bluong commented Sep 24, 2015

@softwords Feel free to reach out if you need any help in development!

@softwords
Copy link
Author

@bluong thanks for the encouragement! I'll have another attempt to get this one ready, and get comfortable with the workflow.

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.

3 participants