开发者

Changing the Speed of a dojox.image.Lightbox

I have tried adding the duration property to one of the links used to construct the lightbox as so:

<a href="test.jpg" dojoType="dojox.image.Lightbox" group="group2" duration="2000" title="xyz">xyz</a>

but that didn't work.

So I have tried using dojo.extend:

dojo.require('dojox.image.Lightbox');
dojo.addOnLoad( function() 
{
 console.log( 'require loaded' );

 // extend dojo.image.LightBox
 dojo.extend
 (
  dojox.image.Lightbox,
  {
   duration: 10000
  }
 );

 // parse 
 dojo.require( 'dojo.parser' );
 dojo.addOnLoad( function() 
 {
  dojo.parser.parse();
  console.log( 'parser run' );  
 } ); 
} );

But it's still not changing the开发者_开发知识库 speed.

Has anyone managed to make the Dojo lightbox less frenetic?


Have you tried extending the LightboxDialog?

dojo.extend
 (
  dojox.image.LightboxDialog,
  {
   duration: 10000
  }
 );

All lightbox instances share this box, and the code is using the LightboxDialog duration to animate, so maybe give it a go? I haven't tried this myself yet, unfortunately.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜