flymis/WebRoot/dojojs/src/widget/Clock.js
(开头部分) 6KB这里只显示每个文件的开头 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.Clock");
dojo.require("dojo.widget.*");
dojo.require("dojo.gfx.*");
dojo.require("dojo.uri.Uri");
dojo.require("dojo.lang.common");
dojo.require("dojo.lang.timing.Timer");
dojo.widget.defineWidget(
"dojo.widget.Clock",
dojo.widget.HtmlWidget,
function(){
var self=this;
this.timeZoneOffset=0; // this is fun.
this.label=""; // optional label.
this.date=new Date();
this.handColor="#788598";
this.handStroke="#6f7b8c";
// this.secondHandColor="#c90405";
this.secondHandColor=[201, 4, 5, 0.8];
this.topLabelColor="#efefef";
this.labelColor="#fff";
// timer
this.timer = new dojo.lang.timing.Timer(1000);
// shapes
this.center={ x:75, y:75 };
this.hands={
hour:null,
minute:null,
second:null
};
this.shadows={
hour:{ shadow:null, shift:{ dx:2, dy:2} },
minute:{ shadow:null, shift:{ dx:2, dy:3} },
second:{ shadow:null, shift:{ dx:4, dy:4} }
};
this.image = dojo.uri.dojoUri("src/widget/templates/images/clock.png");
this.surface=null;
this.labelNode=null;
this.topLabelNode=null;
this.draw=function(){
self.date=new Date();
var h=(self.date.getHours()+self.timeZoneOffset) % 12;
var m=self.date.getMinutes();
var s=self.date.getSeconds();
后面还有 151 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。