Skip to content

Commit 519c946

Browse files
committed
removed comments in background.js. Updated componentmap line 223 to remove the 50 vertical offset
1 parent 29ddc7d commit 519c946

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/app/components/StateRoute/ComponentMap/ComponentMap.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const defaultMargin: DefaultMargin = {
3838

3939
const nodeCoords: object = {};
4040
let count: number = 0;
41-
let aspect: number = 1;
41+
let aspect: number = 1; // aspect resizes the component map container to accommodate large node trees on complex sites
4242
let nodeCoordTier = 0;
4343
let nodeOneLeft = 0;
4444
let nodeTwoLeft = 2;
@@ -204,7 +204,7 @@ export default function ComponentMap({
204204
setSelectedNode={setSelectedNode}
205205
/>
206206

207-
<svg ref={containerRef} width={totalWidth} height={totalHeight + 200}>
207+
<svg ref={containerRef} width={totalWidth} height={totalHeight + 0}>
208208
{/* <LinearGradient id='root-gradient' from='#e75e62' to='#f00008' /> */}
209209
<LinearGradient id='root-gradient' from='#488689' to='#3c6e71' />
210210
<LinearGradient id='parent-gradient' from='#488689' to='#3c6e71' />
@@ -214,13 +214,13 @@ export default function ComponentMap({
214214
hideTooltip();
215215
}}
216216
width={sizeWidth / aspect}
217-
height={sizeHeight / aspect + 200}
217+
height={sizeHeight / aspect + 0}
218218
rx={14}
219219
/>
220220
<Group transform={`scale(${aspect})`} top={margin.top} left={margin.left}>
221221
<Tree
222222
root={hierarchy(startNode, (d) => (d.isExpanded ? d.children : null))}
223-
size={[sizeWidth / aspect, sizeHeight / aspect + 50]}
223+
size={[sizeWidth / aspect, sizeHeight / aspect]}
224224
separation={(a, b) => (a.parent === b.parent ? 0.5 : 0.5) / a.depth}
225225
>
226226
{(tree) => (

src/extension/background.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,6 @@ chrome.contextMenus.onClicked.addListener(({ menuItemId }) => {
507507
// console.log(displayUnitInfo);
508508
// });
509509
chrome.windows.getCurrent((window) => {
510-
console.log(window);
511510
const invokedScreenTop = 75; // window.top || 0;
512511
const invokedScreenLeft = window.width < 1000 ? window.left + window.width - 1000 : window.left;
513512
const invokedScreenWidth = 1000;
@@ -520,7 +519,6 @@ chrome.contextMenus.onClicked.addListener(({ menuItemId }) => {
520519
height: invokedScreenHeight,
521520
url: chrome.runtime.getURL('panel.html'),
522521
};
523-
console.log(options);
524522
if (menuItemId === 'reactime') chrome.windows.create(options);
525523
});
526524

0 commit comments

Comments
 (0)