flymis/WebRoot/dojojs/src/widget/SlideShow.js
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
Copyright (c) 2004-2006, The Dojo Foundation
All Rights Reserved.
Licensed under the Academic Free License version 2.1 or above OR the
modified BSD license. For more information on Dojo licensing, see:
http://dojotoolkit.org/community/licensing.shtml
*/
dojo.provide("dojo.widget.SlideShow");
dojo.require("dojo.event.*");
dojo.require("dojo.widget.*");
dojo.require("dojo.lfx.*");
dojo.require("dojo.html.display");
dojo.widget.defineWidget(
"dojo.widget.SlideShow",
dojo.widget.HtmlWidget,
{
templatePath: dojo.uri.dojoUri("src/widget/templates/SlideShow.html"),
templateCssPath: dojo.uri.dojoUri("src/widget/templates/SlideShow.css"),
// useful properties
imgUrls: [], // the images we'll go through
imgUrlBase: "",
urlsIdx: 0, // where in the images we are
delay: 4000, // give it 4 seconds
transitionInterval: 2000, // 2 seconds
imgWidth: 800, // img width
imgHeight: 600, // img height
background: "img2", // what's in the bg
foreground: "img1", // what's in the fg
stopped: false, // should I stay or should I go?
fadeAnim: null, // references our animation
// our DOM nodes:
imagesContainer: null,
startStopButton: null,
controlsContainer: null,
img1: null,
img2: null,
preventCache: false,
fillInTemplate: function(){
// safari will cache the images and not fire an image onload event if
// there are only two images in the slideshow
if(dojo.render.html.safari && this.imgUrls.length == 2) {
this.preventCache = true;
}
dojo.html.setOpacity(this.img1, 0.9999);
dojo.html.setOpacity(this.img2, 0.9999);
with(this.imagesContainer.style){
width = this.imgWidth+"px";
height = this.imgHeight+"px";
}
with(this.img1.style){
width = this.imgWidth+"px";
height = this.imgHeight+"px";
后面还有 81 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。