芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/.trash/cepali/question/type/ddwtos/amd/build/ddwtos.min.js
define(["jquery","core/dragdrop","core/key_codes"],function(a,b,c){"use strict";function d(a,b){this.containerId=a,b&&this.getRoot().addClass("qtype_ddwtos-readonly"),this.resizeAllDragsAndDrops(),this.cloneDrags(),this.positionDrags()}d.prototype.resizeAllDragsAndDrops=function(){var b=this;this.getRoot().find(".answercontainer > div").each(function(c,d){b.resizeAllDragsAndDropsInGroup(b.getClassnameNumericSuffix(a(d),"draggrouphomes"))})},d.prototype.resizeAllDragsAndDropsInGroup=function(a){var b=this,c=this.getRoot().find(".draggrouphomes"+a+" span.draghome"),d=0,e=0;c.each(function(a,b){d=Math.max(d,Math.ceil(b.offsetWidth)),e=Math.max(e,Math.ceil(0+b.offsetHeight))}),d+=8,e+=2,c.each(function(a,c){b.setElementSize(c,d,e)}),this.getRoot().find("span.drop.group"+a).each(function(a,c){b.setElementSize(c,d,e)})},d.prototype.setElementSize=function(b,c,d){a(b).width(c).height(d).css("lineHeight",d+"px")},d.prototype.cloneDrags=function(){var b=this;this.getRoot().find("span.draghome").each(function(c,d){b.cloneDragsForOneChoice(a(d))})},d.prototype.cloneDragsForOneChoice=function(a){if(a.hasClass("infinite"))for(var b=this.noOfDropsInGroup(this.getGroup(a)),c=0;c
1;)c--,d=this.getUnplacedChoice(a,c);return d},d.prototype.animateTo=function(a,b){var c=a.offset(),d=b.offset();a.addClass("beingdragged"),a.animate({left:parseInt(a.css("left"))+d.left-c.left,top:parseInt(a.css("top"))+d.top-c.top},{duration:"fast",done:function(){a.removeClass("beingdragged"),a.offset(d)}})},d.prototype.isPointInDrop=function(a,b,c){var d=c.offset();return a>=d.left&&a
=d.top&&b