flymis/WebRoot/dojojs/src/widget/Spinner.js
(开头部分) 18KB这里只显示每个文件的开头 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.Spinner");
dojo.require("dojo.io.*");
dojo.require("dojo.lfx.*");
dojo.require("dojo.html.*");
dojo.require("dojo.html.layout");
dojo.require("dojo.string");
dojo.require("dojo.widget.*");
dojo.require("dojo.widget.IntegerTextbox");
dojo.require("dojo.widget.RealNumberTextbox");
dojo.require("dojo.widget.DateTextbox");
dojo.require("dojo.experimental");
// summary: Mixin for validation widgets with a spinner
// description: This class basically (conceptually) extends dojo.widget.ValidationTextbox.
// It modifies the template to have up/down arrows, and provides related handling code.
dojo.declare(
"dojo.widget.Spinner",
null,
{
_typamaticTimer: null,
_typamaticFunction: null,
_currentTimeout: this.defaultTimeout,
_eventCount: 0,
// Number
// number of milliseconds before a held key or button becomes typematic
defaultTimeout: 500,
// Number
// fraction of time used to change the typematic timer between events
// 1.0 means that each typematic event fires at defaultTimeout intervals
// < 1.0 means that each typematic event fires at an increasing faster rate
timeoutChangeRate: 0.90,
templatePath: dojo.uri.dojoUri("src/widget/templates/Spinner.html"),
templateCssPath: dojo.uri.dojoUri("src/widget/templates/Spinner.css"),
// String
// up arrow graphic URL
incrementSrc: dojo.uri.dojoUri("src/widget/templates/images/spinnerIncrement.gif"),
// String
// down arrow graphic URL
decrementSrc: dojo.uri.dojoUri("src/widget/templates/images/spinnerDecrement.gif"),
// does the keyboard related stuff
_handleKeyEvents: function(/*Event*/ evt){
if(!evt.key){ return; }
if(!evt.ctrlKey && !evt.altKey){
switch(evt.key){
case evt.KEY_DOWN_ARROW:
后面还有 562 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。