1. #11
    Sencha User
    Join Date
    Sep 2007
    Posts
    98
    Vote Rating
    1
    adam.jimenez is on a distinguished road

      0  

    Default


    This extension is excellent, thank you.

    I found a bug where if you select the tree root and a bunch of nodes and then try to click one of them - the selection doesn't change. This is very apparent if you select all of the nodes including root and can't get back to single selection (unless you start ctrl-clicking to deselect first).

    This is my fix:

    change:
    onNodeClick : function(node, e){
    if (e.shiftKey) e.preventDefault();
    // disable select unless not using a dragZone, or a multiselectdragzone
    if ( !this.tree.dragZone || !this.tree.dragZone.isMultiSelect ) {
    this.onMouseDown(node, e);
    this.onMouseUp(node, e);
    }
    },
    to:
    onNodeClick : function(node, e){
    if (e.shiftKey) e.preventDefault();
    // disable select unless not using a dragZone, or a multiselectdragzone
    if ( !this.tree.dragZone || !this.tree.dragZone.isMultiSelect || this.tree.root.isSelected() ) {
    this.onMouseDown(node, e);
    this.onMouseUp(node, e);
    }
    },

  2. #12
    Sencha User
    Join Date
    Mar 2008
    Location
    Adelaide, Australia
    Posts
    72
    Vote Rating
    0
    Deadmeat is on a distinguished road

      0  

    Default


    The actual bug seems to be related to selecting a non-draggable node(ie the root node, which is causing onBeforeDrag to return false.) Dragging the root node is going to cause bugs anyway.

    I think even with your fix, so long as the root node (or any other non-draggable node) is selected, you still can't drag anything. Disabled nodes have the same problems, altho they shouldn't be able to be selected anyway.

    The obvious fixes are:
    • Hide the root, making it unselectable.
    • Make all undraggable nodes unselectable by changing selectNode.
    • Filter the selected nodes to remove undraggable ones, and drag the rest.

    The way the selection and drag work here is basically the wrong way to do it. The right way involves detecting mousedown/up events before the DD (drag/drop) code does (This happens in v4.2 at least). However that's not feasible with the ExtJS 3.x tree as far as I can determine.

    I've uploaded the fix to the github repo.

    The change is here:

    Code:
    getUniqueSelectedNodes: function() {
    	var ret = [];
    	for (var c=0;c<this.selNodes.length;c++) {
    		var parent = this.selNodes[c];
    		if (!parent.draggable && !parent.disabled) continue; // skip root node...
    		ret.push(parent);
    		// nodes are sorted(?) so skip over subsequent nodes inside this one..
    		while ((c+1)<this.selNodes.length && parent.contains(this.selNodes[c+1])) c+;
    	}
    	return ret;
    },
    Sorry the reply has taken so long, apparently I don't get the emails anymore.

    Quote Originally Posted by adam.jimenez View Post
    This extension is excellent, thank you.

    I found a bug where if you select the tree root and a bunch of nodes and then try to click one of them - the selection doesn't change. This is very apparent if you select all of the nodes including root and can't get back to single selection (unless you start ctrl-clicking to deselect first).

  3. #13
    Sencha User
    Join Date
    Jul 2013
    Posts
    1
    Vote Rating
    0
    gm.marwah@gmail.com is on a distinguished road

      0  

    Default Does this solution works for ExtJS 4.1

    Does this solution works for ExtJS 4.1


    Hi DeadMeat,
    Does this solution works for ExtJS 4.1. As most of the classes and ux package seems to be out of date. Did you happen to upgrade the solution to 4.1, can you share with us ?

    Thanks

  4. #14
    Sencha User
    Join Date
    Mar 2008
    Location
    Adelaide, Australia
    Posts
    72
    Vote Rating
    0
    Deadmeat is on a distinguished road

      0  

    Default


    Quote Originally Posted by gm.marwah@gmail.com View Post
    Hi DeadMeat,
    Does this solution works for ExtJS 4.1. As most of the classes and ux package seems to be out of date. Did you happen to upgrade the solution to 4.1, can you share with us ?

    Thanks
    This code isn't ported to ExtJS 4.x and isn't necessary either, since the default tree supports the main feature, and has several additional advantages besides.

    4.1 has its own bugs, which aren't high on Sencha's priorities, but there is several examples out there on how to avoid/fix them.

    E.G. https://github.com/colinlear/ExtJS-4...g-and-Drop-Fix

    Basically this extension is EOL.

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."