How to handle transitions of custom elements generated by an event?

亡梦爱人 提交于 2019-12-13 19:09:40

问题


I'm wondering what the appropriate way is to deal with custom elements generated using on('renderlet', function(){...}) when you need them to transition smoothly? Any help would be great


回答1:


It's now possible, as of dc.js 2.0.0 beta 11, to add elements in the 'pretransition' event, and at the same time add transitions on these elements.

The transitions will run in parallel with the transitions on built-in elements.

https://github.com/dc-js/dc.js/issues/806

chart.on('pretransition', function(chart) {
    chart.select(...).append(...)
       // create stuff
       .transition().duration(chart.transitionDuration())
       // change stuff


来源:https://stackoverflow.com/questions/29674385/how-to-handle-transitions-of-custom-elements-generated-by-an-event

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!