如何处理事件生成的自定义元素的过渡? [英] How to handle transitions of custom elements generated by an event?

查看:76
本文介绍了如何处理事件生成的自定义元素的过渡?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道当需要平滑过渡时使用on('renderlet',function(){...})生成的自定义元素的合适方法是什么?任何帮助都很好

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

推荐答案

从dc.js 2.0.0 beta 11开始,现在可以在'pretransition'事件中添加元素,并同时在这些要素.

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

这篇关于如何处理事件生成的自定义元素的过渡?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆