flymis/WebRoot/dojojs/src/widget/AnimatedPng.js
(开头部分) 2KB这里只显示每个文件的开头 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.AnimatedPng");
dojo.require("dojo.widget.*");
dojo.require("dojo.widget.HtmlWidget");
// summary
// PNGs have great tranparency, but lack animation.
// This widget lets you point an img tag at an animated gif for graceful degrading,
// while letting you specify a png containing a grid of cells to animate between.
//
// usage
// <img dojoType="AnimatedPng"
// src="images/animatedpng_static.gif" (for degradation; in case javascript is disabled)
// aniSrc="images/animatedpng_frames.gif"
// width="20"
// height="20"
// interval="50"
// />
//
// var params = {src: "images/animatedpng_static.gif", aniSrc: "images/animatedpng_frames.gif", width: 20, height: 20, interval: 50};
// var widget = dojo.widget.createWidget("AnimatedPng", params, document.getElementById("pngContainer"));
//
dojo.widget.defineWidget(
"dojo.widget.AnimatedPng",
dojo.widget.HtmlWidget,
{
isContainer: false,
// Integer
// width (of each frame) in pixels
width: 0,
// Integer
// height (of each frame) in pixels
height: 0,
// String
// pathname to png file containing frames to be animated (ie, displayed sequentially)
aniSrc: '',
// Integer
// time to display each frame
interval: 100,
_blankSrc: dojo.uri.dojoUri("src/widget/templates/images/blank.gif"),
templateString: '<img class="dojoAnimatedPng" />',
postCreate: function(){
this.cellWidth = this.width;
后面还有 38 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。