Opened 12 years ago
Closed 11 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: |
Description
Hi!
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.selectNone(); this.anchor = this.current; this._addItemClass(this.anchor, "Anchor"); this.selection[this.current.id] = 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.
Thanks!
Change History (3)
comment:1 Changed 12 years ago by
Milestone: | tbd → 1.4 |
---|---|
Status: | new → assigned |
comment:3 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Robot missed [21953].
Makes sense.