Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit d865862

Browse files
committed
Review comments
1 parent fd64be6 commit d865862

2 files changed

Lines changed: 12 additions & 11 deletions

File tree

src/project/FileTreeView.js

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,35 +114,36 @@ define(function (require, exports, module) {
114114
/**
115115
* @private
116116
*
117-
* Create an appropriate div based thickness to indent the tree correctly.
117+
* Create an appropriate div based "thickness" to indent the tree correctly.
118118
*
119-
* @param {int} depth - The depthness of the current node.
120-
* @return {ReactComponent} - The resulting div.
119+
* @param {int} depth The depth of the current node.
120+
* @return {ReactComponent} The resulting div.
121121
*/
122122
function _createThickness(depth) {
123123
return DOM.div({
124124
className: "thickness",
125125
style: {
126-
width: (INDENTATION_WIDTH * depth) + "px"
126+
display: "inline-block",
127+
width: INDENTATION_WIDTH * depth
127128
}
128129
});
129130
}
130131

131132
/**
132133
* @private
133134
*
134-
* Create the arrow icons used for the folders indented correctly.
135+
* Create, and indent correctly, the arrow icons used for the folders.
135136
*
136-
* @param {int} depth - The depthness of the current node.
137-
* @return {ReactComponent} - The resulting ins.
137+
* @param {int} depth The depth of the current node.
138+
* @return {ReactComponent} The resulting ins.
138139
*/
139140
function _createAlignedIns(depth) {
140141
return DOM.ins({
141142
className: "jstree-icon",
142143
style: {
143-
marginLeft: (INDENTATION_WIDTH * depth) + "px"
144+
marginLeft: INDENTATION_WIDTH * depth
144145
}
145-
}, " ");
146+
});
146147
}
147148

148149
/**
@@ -503,8 +504,9 @@ define(function (require, exports, module) {
503504
},
504505
DOM.ins({
505506
className: "jstree-icon"
506-
}, " "),
507+
}),
507508
];
509+
508510
var thickness = _createThickness(this.props.depth);
509511

510512
if (this.props.entry.get("rename")) {

src/styles/jsTreeTheme.less

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ li.jstree-closed > ul { display:none; }
4646
.jstree-brackets .jstree-open > ins { background-position:-72px 0; }
4747
.jstree-brackets .jstree-closed > ins { background-position:-54px 0; }
4848
.jstree-brackets .jstree-leaf > ins { background-position:-36px 0; }
49-
.jstree-brackets .thickness { display: inline-block; }
5049

5150
.jstree-brackets li a:hover {
5251
text-decoration: none;

0 commit comments

Comments
 (0)