【问题标题】:Speed up animation of TitlePane in Dojo加速 Dojo 中 TitlePane 的动画
【发布时间】:2015-03-18 10:14:43
【问题描述】:

我正在尝试加快或删除 Dojo 中标题窗格的wipeIn 和wipeOut 动画。单击标题栏后,内容应立即出现。在其他框架中,我会修改动画速度或持续时间,但到目前为止,我在 dojo 中没有运气。我也尝试过覆盖动画,但没有取得太大的成功。

这是(简化的)我创建 TitlePane 的方式:

require(["dijit/TitlePane", "dojo/dom-construct"], function(TitlePane, domConstruct){
    var titlePaneOptions = {};
    titlePaneOptions.title = "Some Title";
    titlePaneOptions.open = true;
    titlePaneOptions.content = "Content";

    this._titlePane = new TitlePane(titlePaneOptions);
    domConstruct.place(this._titlePane.domNode, this.context.element, "only");

    this._titlePane.startup();
});

【问题讨论】:

    标签: javascript dojo


    【解决方案1】:

    查看TitlePane 的API 文档,在属性摘要下,有一个duration

    duration - 淡入/淡出的时间(以毫秒为单位)

    例如:

    var titlePaneOptions = {};
    titlePaneOptions.title = "Some Title";
    titlePaneOptions.open = true;
    titlePaneOptions.content = "Content";
    titlePaneOptions.duration = 0;
    

    .. 应该让它立即出现/消失。

    【讨论】:

      猜你喜欢
      • 2011-11-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-04-10
      相关资源
      最近更新 更多