flymis/WebRoot/dojojs/src/widget/ResizeHandle.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.ResizeHandle");
dojo.require("dojo.widget.*");
dojo.require("dojo.html.layout");
dojo.require("dojo.event.*");
dojo.widget.defineWidget(
"dojo.widget.ResizeHandle",
dojo.widget.HtmlWidget,
{
isSizing: false,
startPoint: null,
startSize: null,
minSize: null,
targetElmId: '',
templateCssPath: dojo.uri.dojoUri("src/widget/templates/ResizeHandle.css"),
templateString: '<div class="dojoHtmlResizeHandle"><div></div></div>',
postCreate: function(){
dojo.event.connect(this.domNode, "onmousedown", this, "beginSizing");
},
beginSizing: function(e){
if (this.isSizing){ return false; }
// get the target dom node to adjust. targetElmId can refer to either a widget or a simple node
this.targetWidget = dojo.widget.byId(this.targetElmId);
this.targetDomNode = this.targetWidget ? this.targetWidget.domNode : dojo.byId(this.targetElmId);
if (!this.targetDomNode){ return; }
this.isSizing = true;
this.startPoint = {'x':e.clientX, 'y':e.clientY};
var mb = dojo.html.getMarginBox(this.targetDomNode);
this.startSize = {'w':mb.width, 'h':mb.height};
dojo.event.kwConnect({
srcObj: dojo.body(),
srcFunc: "onmousemove",
targetObj: this,
targetFunc: "changeSizing",
rate: 25
});
dojo.event.connect(dojo.body(), "onmouseup", this, "endSizing");
e.preventDefault();
},
changeSizing: function(e){
后面还有 43 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。