BN089-BS开发框架MVC4版/source20131023/Zephyr.Web/Content/css/metro/js/tile-drag.js
(开头部分) 15KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/**
* drag'n'drop plugin
*
* this plugin allows to drag tiles between groups
*
* this plugin auto enabled to 'tile-group' elements
* or elements with attribute data-role="tile-group"
*
* to handle drag/drop events use next code
*
$(function(){
$('#tile_group_id').on('drag', function(e, draggingTile, parentGroup){
... your code ...
});
$('#tile_group_id').on('drop', function(e, draggingTile, targetGroup){
... your code ...
});
});
*
*/
(function($) {
$.TileDrag = function(element, options) {
var defaults = {};
var plugin = this;
plugin.settings = {};
var $element = $(element),
$startMenu,
$groups,
settings,
tiles,
$draggingTile,
$parentGroup, // parent group for dragging tile
draggingTileWidth,
draggingTileHeight,
$phantomTile,
tileDeltaX,
tileDeltaY,
tilesCoordinates,
tileSearchCount = 0, // uses for findTileUnderCursor function
tileUnderCursorIndex,
tileUnderCursorSide,
newGroupsCoordinates,
newGroupSearchCount = 0,
newGroupPhantom,
targetType, // 'new' or 'existing' group
groupsMaxHeight,
mouseMoved,
tileDragTimer;
plugin.init = function() {
settings = plugin.settings = $.extend({}, defaults, options);
$startMenu = $('.tiles');
后面还有 428 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
