Opened 11 years ago
Closed 9 years ago
#10703 closed defect (patchwelcome)
the Weird Behavior of dojo.dnd.Moveable !
Reported by: | Ran Mory | Owned by: | Eugene Lazutkin |
---|---|---|---|
Priority: | high | Milestone: | future |
Component: | DnD | Version: | 1.4.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
/** I called the DndElement class and I pass in the parameters Source (dnd source), target (target source), elementDroppe (droppedEelement (domNode)) myMoveable (which represents the widjet dojo.dnd.Moveable) boolean true var = new DndElement (source, elementDroppe, target, myMoveable, true); */ dojo.declare( "DndElement", { //proprietes de la classe _node : null, _target : null, _source : null, _myMoveable :null, _verifDnd :null, //constructor constructor : function (source, elementDroppe, target, myMoveable, verifDnd) { this._source = source; this._node = elementDroppe; this._target = target; this._myMoveable = myMoveable; this._verifDnd = verifDnd; console.log("constructeur show moveable ", this._myMoveable); }, // methodes cancel : function () { /** *in calling the cancel function this._verifDnd is verified if it is true Then: *we remove the moveable widjet */ if (this._verifDnd) { // destroy the moveable this._myMoveable.destroy(); } }, restore : function () { /** *in calling the restore function this._verifDnd is verified if it is true Then: *we recreate the moveable widjet on this._node */ if (this._verifDnd) { // recrer moveable sur le node passé en parametre de constructeur var monMoveable = new dojo.dnd.Moveable( this._node); this._myMoveable = monMoveable; } } });
So every time I call cancel function the moveable is destroyed, and in the restore function I recreated again. It works well, but sometimes in the cancel function I find it always moveable even if I did destroy,
So I can not control in which case the destroy doesn't work?
Change History (2)
comment:1 Changed 11 years ago by
Description: | modified (diff) |
---|---|
Milestone: | tbd → future |
Priority: | highest → normal |
Status: | new → assigned |
Type: | task → defect |
comment:2 Changed 9 years ago by
Resolution: | → patchwelcome |
---|---|
Status: | assigned → closed |
Looks like this ticket was abandoned. Closing for now.
Note: See
TracTickets for help on using
tickets.
Could you attach a complete test case as a file, which demonstrates the problem? You can use Dojo from CDN, if you want it to be portable and immediately runnable.