My favorites | Sign in
Project Home Downloads
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 305: Node partsel stat is inconsistent with unselectable children
3 people starred this issue and may be notified of changes. Back to list
Status:  WontFix
Owner:  ----
Closed:  May 2014


 
Reported by a...@tracksimple.com, Apr 5, 2012
What steps will reproduce the problem?
1. selectMode: 3 
2. parent node selectable, child node 1 selectable and selected, child node 2 unselectable
3. on load, parent node style is partsel
3. after deselecting and selecting child node 1, parent node style is not partsel

Example html file attached.

What is the expected output? What do you see instead?

I expect the state of the parent node to be the same on load and after the (deselection and reselection) of child node 1.

Instead, the parent node loads up looking partially selected. After the (deselection and reselection) of child node 1, it renders selected.

What version of the dynatree and jQuery are you using?
http://dynatree.googlecode.com/svn/trunk/src/jquery.dynatree.js
jquery 1.5.2

On what operating system and browser?
mac + chrome

Please provide any additional information below.
I could not fix the issue using configuration or css. I have made a small change to _fixSelectionState to fix this issue

:~ $ diff jquery.dynatree.js Downloads/jquery.dynatree.js 
900c900
< 					if( (!n.bSelected && !n.data.isStatusNode && !n.data.unselectable) || n.data.unselectable) {
---
> 					if( !n.bSelected && !n.data.isStatusNode && !n.data.unselectable) {

dynatree_repro.html
1.0 KB   View   Download
jquery.dynatree.fixed.js
102 KB   View   Download
Apr 5, 2012
#1 a...@tracksimple.com
jsfiddle with the bug demo here - http://jsfiddle.net/xYF83/2/
Apr 8, 2012
Project Member #2 moo...@wwwendt.de
(No comment was entered for this change.)
Status: Accepted
Labels: Milestone-Release1.2.1
Jun 8, 2012
Project Member #3 moo...@wwwendt.de
This is a perfect bug report with sample, fiddle and even a patch. Sorry it yet  took me so long to react ;-)

Even with your patch applied there is still an inconsistency when the parent node is (de)selected.

If a parent with an unselectable child is selected, would you expect it to appear selected or partly selected?
In other words: should unselectable node behave as 'unchecked' or as 'not existing'. In the latter case I would think that a visual clue for unelectable children is required (e.g. dimmed)

Status: Waiting
Jun 16, 2012
Project Member #4 moo...@wwwendt.de
(No comment was entered for this change.)
Labels: -Milestone-Release1.2.1 Milestone-Release1.2.2
Aug 7, 2012
#5 pablogan...@gmail.com
this is my ugly fix until this issue get's resolved:

jQuery(".dynatree-partsel").removeClass('dynatree-partsel');

I hope to help somebody in a hurry.


Aug 29, 2012
#6 Olexandr...@gmail.com
> If a parent with an unselectable child is selected, would you expect it to appear selected or partly selected?
> In other words: should unselectable node behave as 'unchecked' or as 'not existing'. > In the latter case I would think that a visual clue for unelectable children is required (e.g. dimmed)

I think user just need to know if all or not all child nodes selected. If all nodes are collapsed and user selects parent it should be marked with green box indicating that not all child nodes selected. How to style these unselectable nodes is responsibility of programmer that marks such nodes as unselectable (so no other specific icon for parent node is required).
Oct 6, 2012
Project Member #7 moo...@wwwendt.de
(No comment was entered for this change.)
Labels: -Milestone-Release1.2.2 Milestone-Release1.2.x
Oct 6, 2013
Project Member #8 moo...@wwwendt.de
Closing 'Waiting' issues without timely answer
Status: Done
Oct 8, 2013
#9 Olexandr...@gmail.com
I would like to vote for this issue because I think it is very important. Please reopen it if possible.

Expected output is fully described by original poster. When selecting parent node that has unselectable child nodes it should be marked as partsel.

When tree is rendered at first time everything works fine: parent node has dynatree-partsel class name and is not selected (and has no dynatree-selected class).
Than there are two cases when issue can be reproduced.
1. When some child nodes unselected and than all child nodes (except unselectable nodes) selected again.
2. When parent node selected by clicking on it.
In both cases parent node became selected and partsel at the same time. And that's where the problem is. It should not be marked as 'selected' but 'partsel' only.

I use a workaround to remove dynatree-selected class in _setSubSel() that helped when parent is clicked but that not solve the whole problem with selected parent(s).

	_setSubSel: function(hasSubSel) {
		if( hasSubSel ) {
			this.hasSubSel = true;
			$(this.span).addClass(this.tree.options.classNames.partsel);
			$(this.span).removeClass(this.tree.options.classNames.selected);
		} else {
			this.hasSubSel = false;
			$(this.span).removeClass(this.tree.options.classNames.partsel);
		}
	},
Oct 8, 2013
Project Member #10 moo...@wwwendt.de
ahh, I see that this issue still had a waiting status although it already was answered.
Status: Accepted
May 1, 2014
Project Member #11 moo...@wwwendt.de
As of 2014 Dynatree is feature frozen.
Please have a look at Fancytree (sequel of DynaTree 1.x): chances are good that the problem was resolved / the requested featuer is already implemented.
Please open a new issue there otherwise:

https://github.com/mar10/fancytree
Status: WontFix
May 3, 2014
Project Member #12 moo...@wwwendt.de
(No comment was entered for this change.)
Labels: -Milestone-Release1.2.x Milestone-Release2.0

Powered by Google Project Hosting