flymis/WebRoot/dojojs/src/widget/Slider.js
(开头部分) 27KB这里只显示每个文件的开头 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.Slider");
// load dependencies
dojo.require("dojo.event.*");
dojo.require("dojo.dnd.*");
// dojo.dnd.* doesn't include this package, because it's not in __package__.js
dojo.require("dojo.dnd.HtmlDragMove");
dojo.require("dojo.widget.*");
dojo.require("dojo.html.layout");
// summary
// Slider Widget.
//
// The slider widget comes in three forms:
// 1. Base Slider widget which supports movement in x and y dimensions
// 2. Vertical Slider (SliderVertical) widget which supports movement
// only in the y dimension.
// 3. Horizontal Slider (SliderHorizontal) widget which supports movement
// only in the x dimension.
//
// The key objects in the widget are:
// - a container div which displays a bar in the background (Slider object)
// - a handle inside the container div, which represents the value
// (sliderHandle DOM node)
// - the object which moves the handle (_handleMove is of type
// SliderDragMoveSource)
//
// The values for the slider are calculated by grouping pixels together,
// based on the number of values to be represented by the slider.
// The number of pixels in a group is called the _valueSize
// e.g. if slider is 150 pixels long, and is representing the values
// 0,1,...10 then pixels are grouped into lots of 15 (_valueSize), where:
// value 0 maps to pixels 0 - 7
// 1 8 - 22
// 2 23 - 37 etc.
// The accuracy of the slider is limited to the number of pixels
// (i.e tiles > pixels will result in the slider not being able to
// represent some values).
dojo.widget.defineWidget (
"dojo.widget.Slider",
dojo.widget.HtmlWidget,
{
// Number
// minimum value to be represented by slider in the horizontal direction
minimumX: 0,
// Number
// minimum value to be represented by slider in the vertical direction
minimumY: 0,
// Number
后面还有 828 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。