[dojo-contributors] DnD question...

Eugene Lazutkin eugene at lazutkin.com
Sat Aug 18 12:42:52 EDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Moveable doesn't define onDragEnd. Look at dojo/dnd/move.js --- the
class is very small and easily readable.

Thanks,

Eugene

Karl Tiedt wrote:
> Right, it doesnt, I was trying this
> 
> postCreate: function(){
> 		// summary:
> 		this.setTitle(this.title);
> 		dojox.layout.FloatingPane.superclass.postCreate.apply(this,arguments);
> 		this.move = new dojo.dnd.Moveable(this.domNode,{ handle: this.focusNode });
> 
> 		if(!this.dockable){ this.dockNode.style.display = "none"; }
> 		if(!this.closable){ this.closeNode.style.display = "none"; }
> 		if(!this.resizable){
> 			this.resizeHandle.style.display = "none"; 	
> 		}else{
> 			var foo = dojo.marginBox(this.domNode);
> 			//this.domNode.style.height = foo.h+"px";
> 			this.domNode.style.width = foo.w+"px";
> 		}
> 	},
> (this.move is my change it was just var move)
> 
> and then I tried connecting dojo.connect(fpane.move,'onDragEnd',
> function(e){alert('dragEnd fired');});
> 
> (firebug shows an onDragEnd event under the fpane.move object..... but
> as I said, not getting anything from that to work :(
> 
> I'll try the topic thing tomorrow and see where that gets me.
> 
> Thanks!
> 
> On 8/18/07, Eugene Lazutkin <eugene at lazutkin.com> wrote:
> I looked at FloatingPane.js and could find any onDragEnd in there. Could
> you give more details?
> 
> Some generic advise on dojo.dnd.move: it fires two topics ---
> /dnd/move/start and /dnd/move/stop. Both of them have the only parameter
> --- the node, which was being moved. You can subscribe to these topics
> to do your custom actions on start/stop events.
> 
> Thanks,
> 
> Eugene
> 
> Karl Tiedt wrote:
>>>> I'm trying to get an event to fire when a floatingPane is moved
>>>> (onDragEnd)... here is what I've done so far...
>>>>
>>>> in FloatingPane.js (dojox.layout....) i've made its var move.... into
>>>> this.move and when i examine this.move from Firebug I see
>>>> onDragEnd.... but I cant for the life of me get it to fire..
>>>>
>>>> Anyone more compotent with DnD able to help me out here?
>>>>
>>>> Thanks!
>>>>
_______________________________________________
dojo-contributors mailing list
dojo-contributors at dojotoolkit.org
http://dojotoolkit.org/mailman/listinfo/dojo-contributors
>>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGxyC3Y214tZwSfCsRAldRAJ4rk5+K8wA1I8ytzVpJrfWFP4RbQwCfcima
xJNoE+GQgT8+PUYQBeaJVrA=
=uzkf
-----END PGP SIGNATURE-----



More information about the dojo-contributors mailing list