gpt4 book ai didi

javascript - 加快 Dojo 中 TitlePane 的动画速度

转载 作者:行者123 更新时间:2023-12-03 10:33:10 25 4
gpt4 key购买 nike

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

这是(简化的)我创建 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();
});

最佳答案

检查 API 文档 TitlePane ,在“属性摘要”下,有一个持续时间:

duration - Time in milliseconds to fade in/fade out

例如:

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

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

关于javascript - 加快 Dojo 中 TitlePane 的动画速度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29119280/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com