Login Register

dnd

Repeated container add/delete eventually crashed dojo

My goal is to have the shopping cart consolidate multiple instances of the same item into one item with a count.

I do this by checking, in the cart's creator function, for an item in the cart with the same data.id as the dndItem we are about to create:
* The cart is scanned for a dndItem with the same data.id as the data.id passed to the creator.
** If such a dndItem is found:
*** I.data.count is copied.
*** is deleted.
*** The creator returns data with data.count = I.data.count + 1.
** If no dndItem with a matching data.id is found:

Tree DND Handle support

I'm trying to programmatically create a nested list of items (for my purposes a maximum of three deep), where only the leaf nodes are drag-able.

So far, I've tried using nested dijit.TitlePanes with multiple dojo.dnd.Sources, however this gets slower the more dojo.dnd.Sources you have (somewhere around 50 or so it becomes unbearable on a fairly decent system).

I took a look at the tree structure, but it looks like the idea of "Handles" was removed from the DND surrounding them, and wasn't able to find a good way to inhibit the dragging of non-leaf nodes.

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)?

Tree widget: when a parent node becomes a child node of its son

Using Dnd feature in tree, you can experience what happens if you drag a parent node and drop it on any of its child nodes:
the parent node and the child node suddenly disappears from the view!

here is what happens in dijit/tests/tree/test_Tree_DnD.html:
treePic.jpg

The explanation simply is we just created an isolated subtree:

dndItem value changes out from under me.

When a second copy of an item is dropped onto my cart, I bump the count on the previous item and delete the new item. The code that computes the cost of the cart then sees one item with a count of 2.

When another copy is dropped, the count on the item already in the cart is back to 1.

Any idea why?

The function in question is longer than the forum allows. The full description is at http://kevinkoch.com/dojo.dnd-question.txt.

How to access data in items in a dnd container?

My dojo.dnd.Source cart has items in it. Each item has data associated with it. We know this because the creator can access data.name, data.price, etc.

When a new item is dropped onto cart, I want to update a "Your total is" display, by adding up data.price of all the items in the cart.

But cart.getAllNodes() returns an array of HTMLDivElement and the data isn't accessible.

How do I access the data in each item in a dojo.dnd.Source?

flickr_viewer question: where is jsonFlickrFeed called?

In flickr_viewer.html, jsonFlickrFeed is where insertNodes is called to add the downloaded data to the div.

Where is jsonFlickrFeed called from? I expect to see it in init, after the io.script.get, but its not there.

What is the actual events sequence used for drag-and-drop?

Hello.

I am not writing anything with dojo myself, but I have a related question anyway )

Incorrect values of checkboxes when dnd-ing rows with IE

Hello, i am new to Dojo and i've got a problem with Drag&Drop in Internet Explorer.

My problem doesn't appear in Firefox, just with IE.

I want to reorder rows in a table, and these rows contain checkboxes.
The problem is that when I drag&drop the rows, values of the dragged checkbox is reset to False,whatever is the real value of the checkbox. (as i can see in the console)
If i just check or uncheck the box without dragging it, there is no problem.

I'm not sure it's clear, i join a part of my code :


script language="javascript" type="text/javascript"

DND not working

Hi, i have a problem with the DND example of the last nightly build :
http://archive.dojotoolkit.org/nightly/dojotoolkit/dojo/tests/dnd/test_d....
The example contains a set of container with the following css style
.container {
display:block;
width:100px
}

If I change this selector to the following one
.container {
display:block;
width:100px;
height:100px;
overflow:auto
}

i can only drop the drag item after having done several try in FF 2.
anybody have a solution to this problem ?

Regards

Syndicate content