Login Register

dnd programatically

Dynamically create DnD items using dijit.form.CheckBox()

[editor: moving to the appropriate forum…]

Hi,
I am trying to dynamically create a listing of map/image layers (using the dijit.form.CheckBox) that allows the user to turn on/off the layer visibility as needed. I also want the user to have the ability to reorder the layers. I am using the dojox.gfx.createSurface to add the map/image layers to the page and was going to change image order based on the DnD list order.

Having a Moveable within another Moveable

I have two dojo.dnd.move.boxConstrainedMoveables within a parent dojo.dnd.move.boxConstrainedMoveable. I would like the two children to operate independently from the parent, meaning that I can drag either one of them around without dragging the parent around. Currently, when I try to do this, the parent is dragged along with them (and in fact, its constraint box changes to become the same as that of the children).

Is it possible to fix this? And if not, is there another way to do what I'm trying to do (see below)?

Dynamic dnd element not dropping

I am dynamically creating dragable elements within a source. I am able to drag the new elements but I am not able to drop them into position.

I tested the code by rewriting it to already include all the elements and it works fine. So there is some issue that I am missing when I dynamically create the elements.

 

dojo.require("dojo.parser");
dojo.require("dojo.dnd.Source");
dojo.require("dojo.dnd.Manager");

programatically setting the selection of a dnd source

I have an application that contains a number of source containers.
The selected items in these containers are associated with a content object and are stored
in a database. When a user selects such a content object I
like to view these selections that have been made for example when the object was saved the last
time.

How can I programatically set the selection of these source containers?

I looked at the Source and Selector classes but couldn't figure out how it works.
I tried setting the selection property of the source object but without success.

Ralph

how to programmatically delete DnD nodes?

Hi,

Dojo book says you should delete DnD nodes like this:

c2.selectAll();
c2.deleteSelectedNodes();
c2.clearItems();

But what happens when you want to delete just a single node? I could not find any dnd.Source method to select a single node programatically...

I think it also should have a method to delete nodes without using selection.

Or I am missing something?

Regards,
Eduardo

Syndicate content