Skip to content

Commit 3ff09c6

Browse files
feat: add details renderinf for cc
1 parent b09c41c commit 3ff09c6

20 files changed

Lines changed: 293 additions & 119 deletions

File tree

example-project/src-client/auth/actions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010

1111
function authenticate(provider) {
1212
return dispatch => {
13-
//cc:signin#1;firebase sign in;+2
13+
//cc:signin#1;firebase sign in;+2;do call to firebase, use credentials and return response
1414
firebaseAuth.signInWithPopup(provider)
1515
.then(result => dispatch(signInSuccess(result)))
1616
.catch(error => dispatch(signInError(error)));

example-project/src-client/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import App from './views/app';
1515
const store = configureStore();
1616
const rootElement = document.getElementById('root');
1717

18-
//cc:layout#0;start;provider
18+
//cc:layout#0;start
1919
function render(Component) {
2020
ReactDOM.render(
2121
<Provider store={store}>

src/public/dist/local/bundle/main.bundle.js

Lines changed: 72 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -47052,7 +47052,8 @@ var LAYOUT_CONFIG = {
4705247052
symbolWidth: SYMBOL_WIDTH,
4705347053
nodeSizeX: 20,
4705447054
nodeSizeY: 60,
47055-
spacing: 20
47055+
spacing: 20,
47056+
detailsShift: 80
4705647057
};
4705747058
var DepEdgeGroups = {
4705847059
TOP_LEFT: 'topLeft',
@@ -47180,7 +47181,6 @@ var CONTROLS_KEYS = {
4718047181
CODE_CRUMBS_MINIMIZE: 'codeCrumbsMinimize',
4718147182
CODE_CRUMBS_LINE_NUMBERS: 'codeCrumbsLineNumbers',
4718247183
CODE_CRUMBS_DETAILS: 'codeCrumbsDetails',
47183-
CODE_CRUMBS_FILTER_FLOW: 'codeCrumbsFilterFlow',
4718447184
SIDE_BAR: 'sideBar'
4718547185
};
4718647186
var VIEW_TYPES = {
@@ -47249,9 +47249,9 @@ var DefaultState = {
4724947249
title: 'Minimize code crumbs',
4725047250
key: _constants__WEBPACK_IMPORTED_MODULE_0__["CONTROLS_KEYS"].CODE_CRUMBS_MINIMIZE
4725147251
}, {
47252-
name: 'current trail only',
47253-
title: 'Show only files for selected flow',
47254-
key: _constants__WEBPACK_IMPORTED_MODULE_0__["CONTROLS_KEYS"].CODE_CRUMBS_FILTER_FLOW
47252+
name: 'details',
47253+
title: 'Show details',
47254+
key: _constants__WEBPACK_IMPORTED_MODULE_0__["CONTROLS_KEYS"].CODE_CRUMBS_DETAILS
4725547255
}, {
4725647256
name: 'line numbers',
4725747257
title: 'Show crumbed line numbers',
@@ -47262,8 +47262,8 @@ var DefaultState = {
4726247262
key: _constants__WEBPACK_IMPORTED_MODULE_0__["CONTROLS_KEYS"].SIDE_BAR,
4726347263
children: []
4726447264
}],
47265-
checkedState: (_checkedState = {}, _defineProperty(_checkedState, _constants__WEBPACK_IMPORTED_MODULE_0__["CONTROLS_KEYS"].SOURCE_DIAGRAM_ON, true), _defineProperty(_checkedState, _constants__WEBPACK_IMPORTED_MODULE_0__["CONTROLS_KEYS"].DEPENDENCIES_SHOW_DIRECT_ONLY, true), _defineProperty(_checkedState, _constants__WEBPACK_IMPORTED_MODULE_0__["CONTROLS_KEYS"].CODE_CRUMBS_LINE_NUMBERS, true), _defineProperty(_checkedState, _constants__WEBPACK_IMPORTED_MODULE_0__["CONTROLS_KEYS"].CODE_CRUMBS_FILTER_FLOW, true), _checkedState),
47266-
disabledState: _defineProperty({}, _constants__WEBPACK_IMPORTED_MODULE_0__["CONTROLS_KEYS"].CODE_CRUMBS_FILTER_FLOW, true),
47265+
checkedState: (_checkedState = {}, _defineProperty(_checkedState, _constants__WEBPACK_IMPORTED_MODULE_0__["CONTROLS_KEYS"].SOURCE_DIAGRAM_ON, true), _defineProperty(_checkedState, _constants__WEBPACK_IMPORTED_MODULE_0__["CONTROLS_KEYS"].DEPENDENCIES_SHOW_DIRECT_ONLY, true), _defineProperty(_checkedState, _constants__WEBPACK_IMPORTED_MODULE_0__["CONTROLS_KEYS"].CODE_CRUMBS_LINE_NUMBERS, true), _defineProperty(_checkedState, _constants__WEBPACK_IMPORTED_MODULE_0__["CONTROLS_KEYS"].CODE_CRUMBS_DETAILS, true), _checkedState),
47266+
disabledState: {},
4726747267
valuesState: {
4726847268
diagramZoom: 1,
4726947269
selectedTabInSideBar: 'Code'
@@ -47534,12 +47534,12 @@ var calcFilesTreeLayoutNodes = function calcFilesTreeLayoutNodes(namespace) {
4753447534
var _getCheckedState2 = Object(core_controlsBus_selectors__WEBPACK_IMPORTED_MODULE_4__["getCheckedState"])(state),
4753547535
codeCrumbsDiagramOn = _getCheckedState2.codeCrumbsDiagramOn,
4753647536
codeCrumbsMinimize = _getCheckedState2.codeCrumbsMinimize,
47537-
codeCrumbsFilterFlow = _getCheckedState2.codeCrumbsFilterFlow;
47537+
codeCrumbsDetails = _getCheckedState2.codeCrumbsDetails;
4753847538

4753947539
if (!sourceTree) return;
4754047540
var activeCodeCrumbs = undefined;
4754147541

47542-
if (codeCrumbsFilterFlow && codeCrumbedFlowsMap[selectedCrumbedFlowKey]) {
47542+
if (codeCrumbedFlowsMap[selectedCrumbedFlowKey]) {
4754347543
activeCodeCrumbs = Object(_utils_treeLayout__WEBPACK_IMPORTED_MODULE_6__["getCodeCrumbsMapForCurrentCcFlow"])({
4754447544
codeCrumbedFlowsMap: codeCrumbedFlowsMap,
4754547545
selectedCrumbedFlowKey: selectedCrumbedFlowKey,
@@ -47551,6 +47551,7 @@ var calcFilesTreeLayoutNodes = function calcFilesTreeLayoutNodes(namespace) {
4755147551
type: _constants__WEBPACK_IMPORTED_MODULE_7__["ACTIONS"].UPDATE_FILES_TREE_LAYOUT_NODES,
4755247552
payload: Object(_utils_treeLayout__WEBPACK_IMPORTED_MODULE_6__["getTreeLayout"])(sourceTree, {
4755347553
includeFileChildren: codeCrumbsDiagramOn && !codeCrumbsMinimize,
47554+
extraSpaceForDetails: codeCrumbsDetails,
4755447555
openedFolders: openedFolders,
4755547556
activeItemsMap: activeItemsMap,
4755647557
activeCodeCrumbs: activeCodeCrumbs
@@ -47607,15 +47608,14 @@ var updateFoldersByActiveChildren = function updateFoldersByActiveChildren(names
4760747608
var _getCheckedState4 = Object(core_controlsBus_selectors__WEBPACK_IMPORTED_MODULE_4__["getCheckedState"])(state),
4760847609
dependenciesDiagramOn = _getCheckedState4.dependenciesDiagramOn,
4760947610
codeCrumbsDiagramOn = _getCheckedState4.codeCrumbsDiagramOn,
47610-
sourceKeepOnlyActiveItems = _getCheckedState4.sourceKeepOnlyActiveItems,
47611-
codeCrumbsFilterFlow = _getCheckedState4.codeCrumbsFilterFlow;
47611+
sourceKeepOnlyActiveItems = _getCheckedState4.sourceKeepOnlyActiveItems;
4761247612

4761347613
var depFilePaths = dependenciesDiagramOn ? Object.keys(selectedNode.dependencies || {}) : [];
4761447614
var ccFilePaths = codeCrumbsDiagramOn ? Object.keys(filesMap).filter(function (path) {
4761547615
return filesMap[path].hasCodecrumbs;
4761647616
}) : [];
4761747617

47618-
if (codeCrumbsFilterFlow && codeCrumbedFlowsMap[selectedCrumbedFlowKey]) {
47618+
if (codeCrumbedFlowsMap[selectedCrumbedFlowKey]) {
4761947619
var currentFlowFiles = Object(_utils_treeLayout__WEBPACK_IMPORTED_MODULE_6__["getFilesForCurrentCcFlow"])({
4762047620
codeCrumbedFlowsMap: codeCrumbedFlowsMap,
4762147621
selectedCrumbedFlowKey: selectedCrumbedFlowKey,
@@ -47825,6 +47825,7 @@ var DefaultNamespaceState = {
4782547825
foldersMap: null,
4782647826
sourceLayoutTree: null,
4782747827
filesLayoutMap: {},
47828+
codecrumbsLayoutMap: {},
4782847829
openedFolders: {},
4782947830
activeItemsMap: {},
4783047831
selectedNode: null,
@@ -47868,9 +47869,12 @@ var getMergeState = function getMergeState(state, namespace) {
4786847869
case _constants__WEBPACK_IMPORTED_MODULE_1__["ACTIONS"].UPDATE_FILES_TREE_LAYOUT_NODES:
4786947870
{
4787047871
var payload = action.payload;
47872+
var filesLayoutMap = Object(_utils_treeLayout__WEBPACK_IMPORTED_MODULE_2__["getFileNodesMap"])(payload);
47873+
var codecrumbsLayoutMap = Object(_utils_treeLayout__WEBPACK_IMPORTED_MODULE_2__["getCodecrumbNodesMap"])(filesLayoutMap);
4787147874
return mergeState({
4787247875
sourceLayoutTree: payload,
47873-
filesLayoutMap: Object(_utils_treeLayout__WEBPACK_IMPORTED_MODULE_2__["getFileNodesMap"])(payload)
47876+
filesLayoutMap: filesLayoutMap,
47877+
codecrumbsLayoutMap: codecrumbsLayoutMap
4787447878
});
4787547879
}
4787647880

@@ -48023,10 +48027,12 @@ var getSource = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createSelector"])(
4802348027
});
4802448028
var getSourceLayout = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createSelector"])([getNamespaceState], function (namespaceState) {
4802548029
var sourceLayoutTree = namespaceState.sourceLayoutTree,
48026-
filesLayoutMap = namespaceState.filesLayoutMap;
48030+
filesLayoutMap = namespaceState.filesLayoutMap,
48031+
codecrumbsLayoutMap = namespaceState.codecrumbsLayoutMap;
4802748032
return {
4802848033
sourceLayoutTree: sourceLayoutTree,
48029-
filesLayoutMap: filesLayoutMap
48034+
filesLayoutMap: filesLayoutMap,
48035+
codecrumbsLayoutMap: codecrumbsLayoutMap
4803048036
};
4803148037
});
4803248038
var getSourceUserChoice = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createSelector"])([getNamespaceState], function (namespaceState) {
@@ -48123,14 +48129,15 @@ var uploadFileAsObject = function uploadFileAsObject(file) {
4812348129
/*!*********************************************!*\
4812448130
!*** ./js/core/dataBus/utils/treeLayout.js ***!
4812548131
\*********************************************/
48126-
/*! exports provided: getTreeLayout, sortCcFiles, getFileNodesMap, getFilesForCurrentCcFlow, getCodeCrumbsMapForCurrentCcFlow */
48132+
/*! exports provided: getTreeLayout, sortCcFiles, getFileNodesMap, getCodecrumbNodesMap, getFilesForCurrentCcFlow, getCodeCrumbsMapForCurrentCcFlow */
4812748133
/***/ (function(module, __webpack_exports__, __webpack_require__) {
4812848134

4812948135
"use strict";
4813048136
__webpack_require__.r(__webpack_exports__);
4813148137
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTreeLayout", function() { return getTreeLayout; });
4813248138
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sortCcFiles", function() { return sortCcFiles; });
4813348139
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFileNodesMap", function() { return getFileNodesMap; });
48140+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCodecrumbNodesMap", function() { return getCodecrumbNodesMap; });
4813448141
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFilesForCurrentCcFlow", function() { return getFilesForCurrentCcFlow; });
4813548142
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCodeCrumbsMapForCurrentCcFlow", function() { return getCodeCrumbsMapForCurrentCcFlow; });
4813648143
/* harmony import */ var d3_flextree__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-flextree */ "../../node_modules/d3-flextree/index.js");
@@ -48141,6 +48148,7 @@ __webpack_require__.r(__webpack_exports__);
4814148148

4814248149
var getTreeLayout = function getTreeLayout(treeData, _ref) {
4814348150
var includeFileChildren = _ref.includeFileChildren,
48151+
extraSpaceForDetails = _ref.extraSpaceForDetails,
4814448152
_ref$config = _ref.config,
4814548153
config = _ref$config === void 0 ? components_treeDiagram_component_constants__WEBPACK_IMPORTED_MODULE_2__["LAYOUT_CONFIG"] : _ref$config,
4814648154
openedFolders = _ref.openedFolders,
@@ -48186,7 +48194,20 @@ var getTreeLayout = function getTreeLayout(treeData, _ref) {
4818648194

4818748195
return [config.nodeSizeX, nameLength * config.symbolWidth + config.nodeSizeY];
4818848196
},
48189-
spacing: function spacing(nodeA, nodeB) {
48197+
spacing: function spacing(node, nodeB) {
48198+
// TODO: refactor
48199+
if (extraSpaceForDetails && node.data.type !== core_constants__WEBPACK_IMPORTED_MODULE_1__["DIR_NODE_TYPE"] && node.data.type !== core_constants__WEBPACK_IMPORTED_MODULE_1__["FILE_NODE_TYPE"]) {
48200+
var _ref3 = node.data.params || {},
48201+
details = _ref3.details;
48202+
48203+
if (details) {
48204+
var nameWidth = node.data.name ? node.data.name.length * 7.5 : 100;
48205+
if (nameWidth < 150) nameWidth = 150;
48206+
var n = Math.ceil(details.length * 7 / nameWidth);
48207+
return n > 3 ? config.detailsShift : n * 20 + 15;
48208+
}
48209+
}
48210+
4819048211
return config.spacing;
4819148212
}
4819248213
});
@@ -48199,16 +48220,16 @@ var sortCcFiles = function sortCcFiles(activeCodeCrumbs) {
4819948220
return 0;
4820048221
}
4820148222

48202-
var bCc = (b.children || []).find(function (_ref3) {
48203-
var _ref3$params = _ref3.params,
48204-
params = _ref3$params === void 0 ? {} : _ref3$params;
48205-
return activeCodeCrumbs[params.original];
48206-
});
48207-
var aCc = (a.children || []).find(function (_ref4) {
48223+
var bCc = (b.children || []).find(function (_ref4) {
4820848224
var _ref4$params = _ref4.params,
4820948225
params = _ref4$params === void 0 ? {} : _ref4$params;
4821048226
return activeCodeCrumbs[params.original];
4821148227
});
48228+
var aCc = (a.children || []).find(function (_ref5) {
48229+
var _ref5$params = _ref5.params,
48230+
params = _ref5$params === void 0 ? {} : _ref5$params;
48231+
return activeCodeCrumbs[params.original];
48232+
});
4821248233

4821348234
if (!bCc || !aCc) {
4821448235
return bCc && !aCc || aCc && !bCc ? -1 : 0;
@@ -48226,33 +48247,44 @@ var getFileNodesMap = function getFileNodesMap(layoutNodes) {
4822648247
});
4822748248
return map;
4822848249
};
48229-
var getFilesForCurrentCcFlow = function getFilesForCurrentCcFlow(_ref5) {
48230-
var codeCrumbedFlowsMap = _ref5.codeCrumbedFlowsMap,
48231-
selectedCrumbedFlowKey = _ref5.selectedCrumbedFlowKey,
48232-
filesMap = _ref5.filesMap;
48250+
var getCodecrumbNodesMap = function getCodecrumbNodesMap(fileNodesMap) {
48251+
return Object.keys(fileNodesMap).reduce(function (map, key) {
48252+
var node = fileNodesMap[key];
48253+
48254+
if (node.data && node.data.type === core_constants__WEBPACK_IMPORTED_MODULE_1__["FILE_NODE_TYPE"] && node.children) {
48255+
map[node.data.path] = node;
48256+
}
48257+
48258+
return map;
48259+
}, {});
48260+
};
48261+
var getFilesForCurrentCcFlow = function getFilesForCurrentCcFlow(_ref6) {
48262+
var codeCrumbedFlowsMap = _ref6.codeCrumbedFlowsMap,
48263+
selectedCrumbedFlowKey = _ref6.selectedCrumbedFlowKey,
48264+
filesMap = _ref6.filesMap;
4823348265
return Object.keys(codeCrumbedFlowsMap[selectedCrumbedFlowKey]).filter(function (filePath) {
48234-
var steps = (filesMap[filePath] && filesMap[filePath].children || []).filter(function (_ref6) {
48235-
var params = _ref6.params;
48266+
var steps = (filesMap[filePath] && filesMap[filePath].children || []).filter(function (_ref7) {
48267+
var params = _ref7.params;
4823648268
return params.flow === selectedCrumbedFlowKey;
4823748269
});
4823848270
return steps && steps.length;
4823948271
});
4824048272
};
48241-
var getCodeCrumbsMapForCurrentCcFlow = function getCodeCrumbsMapForCurrentCcFlow(_ref7) {
48242-
var codeCrumbedFlowsMap = _ref7.codeCrumbedFlowsMap,
48243-
selectedCrumbedFlowKey = _ref7.selectedCrumbedFlowKey,
48244-
filesMap = _ref7.filesMap;
48273+
var getCodeCrumbsMapForCurrentCcFlow = function getCodeCrumbsMapForCurrentCcFlow(_ref8) {
48274+
var codeCrumbedFlowsMap = _ref8.codeCrumbedFlowsMap,
48275+
selectedCrumbedFlowKey = _ref8.selectedCrumbedFlowKey,
48276+
filesMap = _ref8.filesMap;
4824548277
var ccMap = {};
4824648278
Object.keys(codeCrumbedFlowsMap[selectedCrumbedFlowKey]).map(function (filePath) {
48247-
return (filesMap[filePath] && filesMap[filePath].children || []).filter(function (_ref8) {
48248-
var params = _ref8.params;
48279+
return (filesMap[filePath] && filesMap[filePath].children || []).filter(function (_ref9) {
48280+
var params = _ref9.params;
4824948281
return params.flow === selectedCrumbedFlowKey;
4825048282
});
4825148283
}).filter(function (steps) {
4825248284
return steps.length;
4825348285
}).forEach(function (steps) {
48254-
steps.forEach(function (_ref9) {
48255-
var params = _ref9.params;
48286+
steps.forEach(function (_ref10) {
48287+
var params = _ref10.params;
4825648288
ccMap[params.original] = 1;
4825748289
});
4825848290
});
@@ -48577,18 +48609,16 @@ function applyReactionOnSwitchToggleToNamespace(_ref) {
4857748609
}
4857848610

4857948611
_context2.next = 16;
48580-
return Object(redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__["all"])([Object(redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__["put"])(Object(core_controlsBus_actions__WEBPACK_IMPORTED_MODULE_5__["setDisabledControl"])(core_controlsBus_constants__WEBPACK_IMPORTED_MODULE_4__["CONTROLS_KEYS"].CODE_CRUMBS_LINE_NUMBERS, checked)), Object(redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__["put"])(Object(core_dataBus_actions__WEBPACK_IMPORTED_MODULE_2__["calcFilesTreeLayoutNodes"])(namespace))]);
48612+
return Object(redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__["all"])([Object(redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__["put"])(Object(core_controlsBus_actions__WEBPACK_IMPORTED_MODULE_5__["setDisabledControl"])(core_controlsBus_constants__WEBPACK_IMPORTED_MODULE_4__["CONTROLS_KEYS"].CODE_CRUMBS_LINE_NUMBERS, checked)), Object(redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__["put"])(Object(core_controlsBus_actions__WEBPACK_IMPORTED_MODULE_5__["setDisabledControl"])(core_controlsBus_constants__WEBPACK_IMPORTED_MODULE_4__["CONTROLS_KEYS"].CODE_CRUMBS_DETAILS, checked)), Object(redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__["put"])(Object(core_dataBus_actions__WEBPACK_IMPORTED_MODULE_2__["calcFilesTreeLayoutNodes"])(namespace))]);
4858148613

4858248614
case 16:
48583-
if (!(switchKey === core_controlsBus_constants__WEBPACK_IMPORTED_MODULE_4__["CONTROLS_KEYS"].CODE_CRUMBS_FILTER_FLOW)) {
48615+
if (!(switchKey === core_controlsBus_constants__WEBPACK_IMPORTED_MODULE_4__["CONTROLS_KEYS"].CODE_CRUMBS_DETAILS)) {
4858448616
_context2.next = 19;
4858548617
break;
4858648618
}
4858748619

4858848620
_context2.next = 19;
48589-
return reactByUpdatingFoldersState({
48590-
namespace: namespace
48591-
});
48621+
return Object(redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__["all"])([Object(redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__["put"])(Object(core_dataBus_actions__WEBPACK_IMPORTED_MODULE_2__["calcFilesTreeLayoutNodes"])(namespace))]);
4859248622

4859348623
case 19:
4859448624
if (!(switchKey === core_controlsBus_constants__WEBPACK_IMPORTED_MODULE_4__["CONTROLS_KEYS"].DEPENDENCIES_DIAGRAM_ON)) {

src/public/js/components/treeDiagram/component/Node/CodeCrumb.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export const CodeCrumbName = props => {
1212
const symbolWidth = 6;
1313
const locWidth = loc.length ? loc.length * symbolWidth + 3 : 0;
1414

15+
// TODO: refactor render
1516
return (
1617
<g className={'CodeCrumbNode'}>
1718
{(cover && (
@@ -28,15 +29,15 @@ export const CodeCrumbName = props => {
2829
locWidth && (
2930
<React.Fragment>
3031
<rect
31-
x={textPoint.x}
32+
x={textPoint.x + (singleCrumb ? 2 : 0)}
3233
y={textPoint.y - 6}
3334
width={locWidth}
3435
height={12}
3536
strokeDasharray="2"
3637
className={'CodeCrumbName-rect'}
3738
/>
3839
<text
39-
x={textPoint.x + 2.5}
40+
x={textPoint.x + 2.5 + (singleCrumb ? 2 : 0)}
4041
y={textPoint.y + 3}
4142
onClick={onClick}
4243
className={'CodeCrumbName-loc'}
@@ -74,14 +75,14 @@ export const CodeCrumbName = props => {
7475
<rect
7576
x={textPoint.x + 2 + (!flow ? locWidth : 0)}
7677
y={position.y - 6}
77-
width={name.length * 7.7}
78+
width={name.length * 7.5}
7879
height={13}
7980
className={'NodeText-cover'}
8081
/>
8182
)) ||
8283
null}
8384
<text
84-
x={textPoint.x + 3 + (!flow ? locWidth : 0) - 1}
85+
x={textPoint.x + 3 + (!flow ? locWidth + (singleCrumb ? 2 : 0) : 0) - 1}
8586
y={textPoint.y + 4}
8687
onClick={onClick}
8788
className={classNames('CodeCrumbName-text', {

src/public/js/components/treeDiagram/component/StandalonePlaceholder/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ const StandalonePlaceholder = props => {
2424
<p className="ant-upload-drag-icon">
2525
<Icon type="inbox" />
2626
</p>
27-
<p className="ant-upload-text">Click or drag `codecrumbs` json file to this area to upload</p>
27+
<p className="ant-upload-text">
28+
Click or drag `codecrumbs` json file to this area to upload
29+
</p>
2830
<p className="ant-upload-hint">All magic will happen automatically right after!</p>
2931
</Dragger>
3032
</div>
@@ -39,4 +41,3 @@ export default connect(
3941
null,
4042
mapDispatchToProps
4143
)(StandalonePlaceholder);
42-

0 commit comments

Comments
 (0)