开发者

Changing the Speed of a dojox.image.Lightbox

开发者 https://www.devze.com 2023-02-03 11:44 出处:网络
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=

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

精彩评论

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