Skip to content

Commit 79bdc3a

Browse files
committed
updated stroke
1 parent 06e5894 commit 79bdc3a

File tree

3 files changed

+23
-11
lines changed

3 files changed

+23
-11
lines changed

src/app/components/ComponentMap.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ export default function ComponentMap({
196196
const handleMouseOver = event => {
197197
() => dispatch(onHover(node.data.rtid));
198198
console.log('line 197', event.target.ownerSVGElement);
199+
console.log('line 199: ', node);
199200
const coords = localPoint(
200201
event.target.ownerSVGElement,
201202
event,
@@ -230,10 +231,15 @@ export default function ComponentMap({
230231
width={width}
231232
y={-height / 2}
232233
x={-width / 2}
234+
//node.children = if node has children
233235
fill={node.children ? '#161521' : '#62d6fb'}
234-
stroke={node.data.isExpanded ? '#95fb62' : '#a69ff5'} // if already child in fill do not all stroke to change change color later but it works!!!!!!!!
236+
//node.data.isExpanded = if node is collapsed
237+
// stroke={(node.data.isExpanded && node.child) ? '#95fb62' : '#a69ff5'} => node.child is gone when clicked, even if it actually has children. Maybe better call node.children => node.leaf
238+
stroke={(node.data.isExpanded && node.data.children.length > 0) ? '#95fb62' : '#a69ff5'}
239+
240+
// if already child in fill do not all stroke to change change color later but it works!!!!!!!!
235241
strokeWidth={3}
236-
strokeDasharray={node.children ? '0' : '1,2'}
242+
// strokeDasharray={node.children ? '0' : '2,2'}
237243
strokeOpacity="1"
238244
rx={node.children ? 4 : 10}
239245
onDoubleClick={() => {

src/app/reducers/mainReducer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ export default (state, action) => produce(state, draft => {
258258
}
259259
case types.NEW_SNAPSHOTS: {
260260
const { payload } = action;
261+
// console.log("in NEW_SANPSHOTS", payload);
261262
Object.keys(tabs).forEach(tab => {
262263
if (!payload[tab]) {
263264
delete tabs[tab];

src/backend/linkFiber.ts

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,13 @@ const recoilDomNode = {};
4949

5050
// Simple check for whether our target app uses Recoil
5151
// can these be regular
52-
if (window.$recoilDebugStates) {
53-
isRecoil = true;
54-
}
52+
53+
54+
// if (window.$recoilDebugStates) {
55+
// isRecoil = true;
56+
// }
57+
58+
5559
// This is deprecated Recoil code. Recoil as of 01-03-2021
5660
// does not work well with Reactime. Leaving any Recoil
5761
// code in codebase to assist with Recoil implementations
@@ -91,7 +95,7 @@ function sendSnapshot(snap: Snapshot, mode: Mode): void {
9195
const payload = snap.tree.cleanTreeCopy();
9296
// if it's Recoil - run different actions?
9397
if (isRecoil) {
94-
console.log('This is recoil and we\'re in sendSnapshot!');
98+
console.log('This is recoil and we\'re in sendSnapshot!');
9599
// getRecoilState()
96100
payload.atomsComponents = atomsComponents;
97101
payload.atomSelectors = atomsSelectors;
@@ -403,8 +407,8 @@ function createTree(
403407
// remove existing rtid before adding a new one
404408
if (pointer.stateNode.classList.length > 0) {
405409
const lastClass = pointer.stateNode.classList[
406-
pointer.stateNode.classList.length - 1
407-
];
410+
pointer.stateNode.classList.length - 1
411+
];
408412
if (lastClass.includes('fromLinkFiber')) {
409413
pointer.stateNode.classList.remove(lastClass);
410414
}
@@ -425,8 +429,8 @@ function createTree(
425429
// remove existing rtid before adding a new one
426430
if (currentFiber.child.stateNode.classList.length > 0) {
427431
const lastClass = currentFiber.child.stateNode.classList[
428-
currentFiber.child.stateNode.classList.length - 1
429-
];
432+
currentFiber.child.stateNode.classList.length - 1
433+
];
430434
if (lastClass.includes('fromLinkFiber')) {
431435
currentFiber.child.stateNode.classList.remove(lastClass);
432436
}
@@ -497,7 +501,8 @@ export default (snap: Snapshot, mode: Mode): (() => void) => {
497501
() => {
498502
console.log('how many times in line 497');
499503
console.log('THIS IS SNAP AND MODEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE', snap, mode);
500-
updateSnapShotTree(snap, mode); },
504+
updateSnapShotTree(snap, mode);
505+
},
501506
70
502507
);
503508
document.addEventListener('visibilitychange', onVisibilityChange);

0 commit comments

Comments
 (0)