Opened 13 years ago

Closed 12 years ago

#9161 closed enhancement (fixed)

Need method in dojo.dnd.Selector to programmatically select containing node

Reported by: Aleksey Rechinskiy Owned by: Eugene Lazutkin
Priority: high Milestone: 1.5
Component: DnD Version: 1.3.0
Keywords: Cc:
Blocked By: Blocking:



I'm not sure if that feature request wasn't discussed, but I've just finished a quick search over a trac and forums and found nothing.

I use dojo.dnd.Selector and its derived classes as containers for some data, that is also used in some other places on my page. When user clicks on associated with contained node data elsewhere on page, it would be very nice and convenient, if the node in dojo.dnd.Selector will be selected. To do that, I need a method in dojo.dnd.Selector like, say, selectNodeById(nodeId).

Long time ago, in days of AFAIR Dojo 1.1, I wrote a following method in my dojo.dnd.Selector derived class ( it is assumed, that only one node could be selected in container ):

selectNode: function(domNode){
	this.current = dojo.byId(domNode);
	this.anchor = this.current;
	this._addItemClass(this.anchor, "Anchor");
	this.selection[] = 1;

I think, it could be used as a starting point for selectNodeById() method, but I'm not sure if my method is completely correct, so a small code audit should be done.

I would like to suggest to include selectNodeById() functionality in dojo.dnd.Selector, as I think it would greatly extend dojo.dnd.Selector class and its descendants use-cases.


Change History (3)

comment:1 Changed 13 years ago by Eugene Lazutkin

Milestone: tbd1.4
Status: newassigned

Makes sense.

comment:2 Changed 12 years ago by bill

Milestone: 1.41.5

... since we passed the 1.4 beta cutoff

comment:3 Changed 12 years ago by Eugene Lazutkin

Resolution: fixed
Status: assignedclosed

Robot missed [21953].

Note: See TracTickets for help on using tickets.