EasyUI Forum
May 17, 2024, 04:33:02 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Bug in tree and combotree  (Read 11277 times)
A-K
Full Member
***
Posts: 122


View Profile WWW
« on: August 03, 2015, 12:47:49 AM »

Hey,

There is a bug in the tree and combotree components,
when there is a scroller in the tree, the selected node is not in the length of the node and it looks weird.
The same in the combotree.

Example: http://jsfiddle.net/3L4ej4dx/62/
Select the node with the text: "Microsoft Officeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" and move the scroller.
Please check it out, Thanks!
« Last Edit: August 03, 2015, 09:22:00 AM by A-K » Logged
A-K
Full Member
***
Posts: 122


View Profile WWW
« Reply #1 on: August 05, 2015, 02:38:58 AM »

stworthy, any updates on this?

Thanks.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #2 on: August 05, 2015, 06:33:34 AM »

Please try this updated example http://jsfiddle.net/3L4ej4dx/68/
Logged
A-K
Full Member
***
Posts: 122


View Profile WWW
« Reply #3 on: August 05, 2015, 06:43:40 AM »

Hey,

It doesnt work well, when there are no rows with long text it looks like this: http://jsfiddle.net/3L4ej4dx/69/
Logged
A-K
Full Member
***
Posts: 122


View Profile WWW
« Reply #4 on: August 07, 2015, 03:02:03 AM »

stworthy, any patch for this?
The css fix is not the best solution.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #5 on: August 07, 2015, 06:41:18 AM »

The alternative solution to solve this issue is to select the node text instead of selecting the whole line. The code below achieves this functionality.
Code:
<script>
(function($){
$(function(){
var css = $('#tree_e_css');
if (!css.length){
var tmp = $('<div class="tree-node-selected"></div>').appendTo('body');
var bc = tmp.css('background-color');
tmp.removeClass('tree-node-selected').addClass('tree-node-hover');
var hc = tmp.css('background-color');
tmp.remove();
$('<style id="tree_e_css">' +
  '.tree-node-selected,.tree-node-hover{background:transparent}' +
  '.tree-node-hover .tree-icon,'+
  '.tree-node-hover .tree-checkbox,'+
  '.tree-node-hover .tree-title{'+
  'background-color:'+hc+
  '}'+
  '.tree-node-selected .tree-icon,'+
  '.tree-node-selected .tree-checkbox,'+
  '.tree-node-selected .tree-title{'+
  'background-color:'+bc+
  '}'+
  '</style>').appendTo('head');
}
});
})(jQuery);
</script>
Logged
A-K
Full Member
***
Posts: 122


View Profile WWW
« Reply #6 on: August 07, 2015, 06:54:55 AM »

Thanks, this solution is the best one yet.

I will use it, but I hope that it will be possible to select the whole row in the next version,
and it will work when the text is short and long.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!