Permalink
Browse files

fix: tree 左侧图标不随着移动以及节点hover效果

  • Loading branch information...
whizbz11 committed Jan 3, 2017
1 parent 6be2f47 commit 80ee7b0d1a379cc149f41b4027251a6cf8dbed60
Showing with 22 additions and 20 deletions.
  1. +4 −7 css/tree.css
  2. +6 −1 dist/css/tree.css
  3. +1 −1 dist/css/tree.min.css
  4. +5 −5 dist/js/u-tree.js
  5. +1 −1 dist/js/u-tree.min.js
  6. +5 −5 js/treeComp.js
View
@@ -101,12 +101,7 @@ website: http://code.google.com/p/jquerytree/
margin-right: 2px;
}
.ztree li > a > span:last-child {
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
width: 80%;
}
.ztree li span.button {
line-height: 0;
@@ -449,9 +444,11 @@ ul.ztree.zTreeDragUL {
}
.ztree li span.button.switch {
position: absolute;
// position: absolute;
position:relative;
z-index: 1000;
line-height: 21px;
float:left;
}
.ztree li span.button.switch.noline_close:after {
View
@@ -107,6 +107,9 @@ website: http://code.google.com/p/jquerytree/
line-height: 16px;
margin-right: 2px;
}
.ztree li span.button {
line-height: 0;
margin: 0;
@@ -448,9 +451,11 @@ ul.ztree.zTreeDragUL {
}
.ztree li span.button.switch {
position: absolute;
// position: absolute;
position:relative;
z-index: 1000;
line-height: 21px;
float:left;
}
.ztree li span.button.switch.noline_close:after {
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -1207,19 +1207,19 @@
// pLeft=checkboxLength+parPaddingLeft+iconLength*(node.level+1) + 30 +'px';
// 因为a标签前面的图标设置成了absolute,所以忽略前面的宽度即减去21px
pLeft=checkboxLength+parPaddingLeft+iconLength*(node.level) + 30 +'px';
pLeft=checkboxLength+parPaddingLeft+iconLength*(node.level +1) +'px';
mLeft = checkboxLength+parPaddingLeft+iconLength*(node.level) +'px';
mLeft = checkboxLength+parPaddingLeft+iconLength*(node.level+1) +'px';
}else{
pLeft=parPaddingLeft+iconLength*(node.level)+30+'px';
mLeft=parPaddingLeft+iconLength*(node.level)+'px';
pLeft=parPaddingLeft+iconLength*(node.level +1)+'px';
mLeft=parPaddingLeft+iconLength*(node.level +1)+'px';
}
fontStyle.push('padding-left', ":",pLeft, ";");
fontStyle.push('margin-left', ":", '-'+mLeft, ";");
// 将a标签的宽度根据上级100%再加上层级之间的padding值算出
parDomWidth='calc(100% + '+18*(node.level+1) +'px )';
fontStyle.push('width', ":", parDomWidth, ";");
fontStyle.push('min-width', ":", parDomWidth, ";");
for (var f in fontcss) {
fontStyle.push(f, ":", fontcss[f], ";");
}
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -1200,19 +1200,19 @@
// pLeft=checkboxLength+parPaddingLeft+iconLength*(node.level+1) + 30 +'px';
// 因为a标签前面的图标设置成了absolute,所以忽略前面的宽度即减去21px
pLeft=checkboxLength+parPaddingLeft+iconLength*(node.level) + 30 +'px';
pLeft=checkboxLength+parPaddingLeft+iconLength*(node.level +1) +'px';
mLeft = checkboxLength+parPaddingLeft+iconLength*(node.level) +'px';
mLeft = checkboxLength+parPaddingLeft+iconLength*(node.level+1) +'px';
}else{
pLeft=parPaddingLeft+iconLength*(node.level)+30+'px';
mLeft=parPaddingLeft+iconLength*(node.level)+'px';
pLeft=parPaddingLeft+iconLength*(node.level +1)+'px';
mLeft=parPaddingLeft+iconLength*(node.level +1)+'px';
}
fontStyle.push('padding-left', ":",pLeft, ";");
fontStyle.push('margin-left', ":", '-'+mLeft, ";");
// 将a标签的宽度根据上级100%再加上层级之间的padding值算出
parDomWidth='calc(100% + '+18*(node.level+1) +'px )';
fontStyle.push('width', ":", parDomWidth, ";");
fontStyle.push('min-width', ":", parDomWidth, ";");
for (var f in fontcss) {
fontStyle.push(f, ":", fontcss[f], ";");
}

0 comments on commit 80ee7b0

Please sign in to comment.