Skip to content

Commit e5862d1

Browse files
committed
Renames separation properties, adds lib prefix for CSS (#13)
1 parent ff26974 commit e5862d1

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/Tree/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ export default class Tree extends React.Component {
217217
[nodeSize.x, nodeSize.y]
218218
)
219219
.separation((a, b) => deepEqual(a.parent, b.parent) ?
220-
separation.node :
221-
separation.leafNode
220+
separation.siblings :
221+
separation.nonSiblings
222222
)
223223
.children((d) => d._collapsed ? null : d._children);
224224

@@ -250,7 +250,7 @@ export default class Tree extends React.Component {
250250
} = this.props;
251251

252252
return (
253-
<div className={`rd3t-tree-container ${zoomable ? 'grabbable' : undefined}`}>
253+
<div className={`rd3t-tree-container ${zoomable ? 'rd3t-grabbable' : undefined}`}>
254254
<svg className="rd3t-svg" width="100%" height="100%">
255255
<TransitionGroup
256256
component="g"
@@ -345,8 +345,8 @@ Tree.propTypes = {
345345
y: PropTypes.number,
346346
}),
347347
separation: PropTypes.shape({
348-
node: PropTypes.number,
349-
leafNode: PropTypes.number,
348+
siblings: PropTypes.number,
349+
nonSiblings: PropTypes.number,
350350
}),
351351
styles: PropTypes.shape({
352352
nodes: PropTypes.object,

src/Tree/style.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
height: 100%;
44
}
55

6-
.grabbable {
6+
.rd3t-grabbable {
77
cursor: move; /* fallback if grab cursor is unsupported */
88
cursor: grab;
99
cursor: -moz-grab;
1010
cursor: -webkit-grab;
1111
}
12-
.grabbable:active {
12+
.rd3t-grabbable:active {
1313
cursor: grabbing;
1414
cursor: -moz-grabbing;
1515
cursor: -webkit-grabbing;

0 commit comments

Comments
 (0)