diff options
-rw-r--r-- | .log/tsserver.log | 188 | ||||
-rw-r--r-- | app/components/graph/graph.tsx | 173 |
2 files changed, 276 insertions, 85 deletions
diff --git a/.log/tsserver.log b/.log/tsserver.log index ee0dd06..220e65a 100644 --- a/.log/tsserver.log +++ b/.log/tsserver.log @@ -3345,3 +3345,191 @@ Info 3020 [15:43:01.477] Returning an empty list because completion was inside a Info 3021 [15:43:01.477] getCompletionData: Get current token: 0.013029009103775024 Info 3022 [15:43:01.477] getCompletionData: Is inside comment: 0.039745986461639404 Info 3023 [15:43:01.477] Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment. +Info 3024 [16:33:23.262] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3025 [16:33:23.310] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 409 structureChanged: false Elapsed: 41.686517983675ms +Info 3026 [16:33:23.310] Different program with same set of files:: structureIsReused:: 2 +Info 3027 [16:33:24.771] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3028 [16:33:24.810] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 410 structureChanged: false Elapsed: 38.42124101519585ms +Info 3029 [16:33:24.810] Different program with same set of files:: structureIsReused:: 2 +Info 3030 [16:33:25.736] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3031 [16:33:25.786] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 411 structureChanged: false Elapsed: 50.18078899383545ms +Info 3032 [16:33:25.786] Different program with same set of files:: structureIsReused:: 2 +Info 3033 [16:33:25.788] getCompletionData: Get current token: 0.0038670003414154053 +Info 3034 [16:33:25.788] getCompletionData: Is inside comment: 0.13775700330734253 +Info 3035 [16:33:25.788] Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment. +Info 3036 [16:33:25.790] getCompletionData: Get current token: 0.0034199953079223633 +Info 3037 [16:33:25.790] getCompletionData: Is inside comment: 0.15612798929214478 +Info 3038 [16:33:25.790] Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment. +Info 3039 [16:33:25.792] getCompletionData: Get current token: 0.0037779808044433594 +Info 3040 [16:33:25.794] getCompletionData: Is inside comment: 1.8622859716415405 +Info 3041 [16:33:25.794] Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment. +Info 3042 [16:33:32.882] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3043 [16:33:32.911] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 412 structureChanged: false Elapsed: 28.238471001386642ms +Info 3044 [16:33:32.911] Different program with same set of files:: structureIsReused:: 2 +Info 3045 [16:33:32.911] getCompletionData: Get current token: 0.012777000665664673 +Info 3046 [16:33:32.912] getCompletionData: Is inside comment: 0.05008900165557861 +Info 3047 [16:33:32.912] getCompletionData: Get previous token 1: 0.030916988849639893 +Info 3048 [16:33:32.912] getCompletionsAtPosition: isCompletionListBlocker: 0.009407013654708862 +Info 3049 [16:33:32.925] getSymbolsFromOtherSourceFileExports: Using cached list +Info 3050 [16:33:33.018] getCompletionData: Semantic work: 106.63148897886276 +Info 3051 [16:33:33.033] getCompletionsAtPosition: getCompletionEntriesFromSymbols: 13.961937010288239 +Info 3052 [16:33:37.395] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3053 [16:33:37.448] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 413 structureChanged: false Elapsed: 53.13578400015831ms +Info 3054 [16:33:37.448] Different program with same set of files:: structureIsReused:: 2 +Info 3055 [16:33:38.692] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3056 [16:33:38.722] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 414 structureChanged: false Elapsed: 29.301313012838364ms +Info 3057 [16:33:38.722] Different program with same set of files:: structureIsReused:: 2 +Info 3058 [16:33:38.723] getCompletionData: Get current token: 0.02220901846885681 +Info 3059 [16:33:38.723] getCompletionData: Is inside comment: 0.32058802247047424 +Info 3060 [16:33:38.724] Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment. +Info 3061 [16:33:38.802] getCompletionData: Get current token: 0.03580498695373535 +Info 3062 [16:33:38.803] getCompletionData: Is inside comment: 0.14197999238967896 +Info 3063 [16:33:38.803] Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment. +Info 3064 [16:33:38.808] getCompletionData: Get current token: 0.011068016290664673 +Info 3065 [16:33:38.808] getCompletionData: Is inside comment: 0.07386800646781921 +Info 3066 [16:33:38.808] Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment. +Info 3067 [16:33:39.177] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3068 [16:33:39.212] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 415 structureChanged: false Elapsed: 34.66891899704933ms +Info 3069 [16:33:39.212] Different program with same set of files:: structureIsReused:: 2 +Info 3070 [16:33:39.213] getCompletionData: Get current token: 0.01857897639274597 +Info 3071 [16:33:39.213] getCompletionData: Is inside comment: 0.0838630199432373 +Info 3072 [16:33:39.213] Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment. +Info 3073 [16:33:39.303] getCompletionData: Get current token: 0.011275023221969604 +Info 3074 [16:33:39.303] getCompletionData: Is inside comment: 0.05229499936103821 +Info 3075 [16:33:39.303] Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment. +Info 3076 [16:33:39.305] getCompletionData: Get current token: 0.01476198434829712 +Info 3077 [16:33:39.305] getCompletionData: Is inside comment: 0.10603001713752747 +Info 3078 [16:33:39.305] Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment. +Info 3079 [16:33:40.085] Format host information updated +Info 3080 [16:33:40.305] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3081 [16:33:40.347] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 416 structureChanged: false Elapsed: 41.71399199962616ms +Info 3082 [16:33:40.347] Different program with same set of files:: structureIsReused:: 2 +Info 3083 [16:33:44.545] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3084 [16:33:44.570] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 417 structureChanged: false Elapsed: 25.183264017105103ms +Info 3085 [16:33:44.570] Different program with same set of files:: structureIsReused:: 2 +Info 3086 [16:33:45.125] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3087 [16:33:45.150] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 418 structureChanged: false Elapsed: 24.929565995931625ms +Info 3088 [16:33:45.150] Different program with same set of files:: structureIsReused:: 2 +Info 3089 [16:33:46.732] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3090 [16:33:46.763] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 419 structureChanged: false Elapsed: 30.357294976711273ms +Info 3091 [16:33:46.763] Different program with same set of files:: structureIsReused:: 2 +Info 3092 [16:33:50.274] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3093 [16:33:50.306] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 420 structureChanged: false Elapsed: 31.715038001537323ms +Info 3094 [16:33:50.306] Different program with same set of files:: structureIsReused:: 2 +Info 3095 [16:33:50.307] getCompletionData: Get current token: 0.01308700442314148 +Info 3096 [16:33:50.307] getCompletionData: Is inside comment: 0.11392900347709656 +Info 3097 [16:33:50.307] Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment. +Info 3098 [16:33:50.312] getCompletionData: Get current token: 0.025205016136169434 +Info 3099 [16:33:50.312] getCompletionData: Is inside comment: 0.11757099628448486 +Info 3100 [16:33:50.312] Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment. +Info 3101 [16:33:50.315] getCompletionData: Get current token: 0.03364601731300354 +Info 3102 [16:33:50.315] getCompletionData: Is inside comment: 0.15244600176811218 +Info 3103 [16:33:50.315] Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment. +Info 3104 [16:34:15.934] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3105 [16:34:15.981] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 421 structureChanged: false Elapsed: 46.279843002557755ms +Info 3106 [16:34:15.981] Different program with same set of files:: structureIsReused:: 2 +Info 3107 [16:35:13.368] Format host information updated +Info 3108 [16:35:13.695] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3109 [16:35:13.779] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 422 structureChanged: false Elapsed: 84.44220599532127ms +Info 3110 [16:35:13.779] Different program with same set of files:: structureIsReused:: 2 +Info 3111 [16:35:18.835] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3112 [16:35:18.865] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 423 structureChanged: false Elapsed: 30.404523998498917ms +Info 3113 [16:35:18.865] Different program with same set of files:: structureIsReused:: 2 +Info 3114 [16:35:19.348] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3115 [16:35:19.381] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 424 structureChanged: false Elapsed: 32.48936399817467ms +Info 3116 [16:35:19.381] Different program with same set of files:: structureIsReused:: 2 +Info 3117 [16:35:29.692] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3118 [16:35:29.730] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 425 structureChanged: false Elapsed: 37.330125987529755ms +Info 3119 [16:35:29.730] Different program with same set of files:: structureIsReused:: 2 +Info 3120 [16:35:43.291] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3121 [16:35:43.329] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 426 structureChanged: false Elapsed: 37.393201023340225ms +Info 3122 [16:35:43.329] Different program with same set of files:: structureIsReused:: 2 +Info 3123 [16:35:44.353] getCompletionData: Get current token: 0.034230977296829224 +Info 3124 [16:35:44.354] getCompletionData: Is inside comment: 0.013832002878189087 +Info 3125 [16:35:44.354] getCompletionData: Get previous token 1: 0.18877598643302917 +Info 3126 [16:35:44.355] getCompletionsAtPosition: isCompletionListBlocker: 0.5770280063152313 +Info 3127 [16:35:44.501] getCompletionData: Semantic work: 146.74629199504852 +Info 3128 [16:35:44.503] getCompletionsAtPosition: getCompletionEntriesFromSymbols: 0.7939859926700592 +Info 3129 [16:35:45.390] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3130 [16:35:45.417] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 427 structureChanged: false Elapsed: 27.227651000022888ms +Info 3131 [16:35:45.417] Different program with same set of files:: structureIsReused:: 2 +Info 3132 [16:35:47.932] forEachExternalModuleToImportFrom: filtered out 1155 modules by package.json contents +Info 3133 [16:35:47.948] forEachExternalModuleToImportFrom: filtered out 191 modules by package.json contents +Info 3134 [16:35:47.948] forEachExternalModuleToImportFrom autoImportProvider: 15.75500500202179 +Info 3135 [16:35:49.823] Format host information updated +Info 3136 [16:35:50.048] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3137 [16:35:50.083] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 428 structureChanged: false Elapsed: 34.266445994377136ms +Info 3138 [16:35:50.083] Different program with same set of files:: structureIsReused:: 2 +Info 3139 [16:36:03.547] Format host information updated +Info 3140 [16:36:03.861] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3141 [16:36:03.907] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 429 structureChanged: false Elapsed: 45.893462002277374ms +Info 3142 [16:36:03.907] Different program with same set of files:: structureIsReused:: 2 +Info 3143 [16:36:35.423] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3144 [16:36:35.478] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 430 structureChanged: false Elapsed: 54.54858300089836ms +Info 3145 [16:36:35.478] Different program with same set of files:: structureIsReused:: 2 +Info 3146 [16:36:50.056] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3147 [16:36:50.095] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 431 structureChanged: false Elapsed: 39.045485973358154ms +Info 3148 [16:36:50.095] Different program with same set of files:: structureIsReused:: 2 +Info 3149 [16:36:51.459] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3150 [16:36:51.518] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 432 structureChanged: false Elapsed: 59.47506299614906ms +Info 3151 [16:36:51.519] Different program with same set of files:: structureIsReused:: 2 +Info 3152 [16:36:51.936] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3153 [16:36:51.989] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 433 structureChanged: false Elapsed: 53.63621100783348ms +Info 3154 [16:36:51.989] Different program with same set of files:: structureIsReused:: 2 +Info 3155 [16:36:51.991] getCompletionData: Get current token: 0.018068015575408936 +Info 3156 [16:36:51.991] getCompletionData: Is inside comment: 0.021073997020721436 +Info 3157 [16:36:51.991] getCompletionData: Get previous token 1: 0.12386298179626465 +Info 3158 [16:36:51.991] getCompletionsAtPosition: isCompletionListBlocker: 0.019613027572631836 +Info 3159 [16:36:52.021] getSymbolsFromOtherSourceFileExports: Using cached list +Info 3160 [16:36:52.081] getCompletionData: Semantic work: 89.4650140106678 +Info 3161 [16:36:52.101] getCompletionsAtPosition: getCompletionEntriesFromSymbols: 19.920556992292404 +Info 3162 [16:36:52.874] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3163 [16:36:52.916] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 434 structureChanged: false Elapsed: 41.67582097649574ms +Info 3164 [16:36:52.916] Different program with same set of files:: structureIsReused:: 2 +Info 3165 [16:37:16.223] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3166 [16:37:16.251] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 435 structureChanged: false Elapsed: 27.447555005550385ms +Info 3167 [16:37:16.251] Different program with same set of files:: structureIsReused:: 2 +Info 3168 [16:37:27.903] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3169 [16:37:27.973] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 436 structureChanged: false Elapsed: 70.7573250234127ms +Info 3170 [16:37:27.974] Different program with same set of files:: structureIsReused:: 2 +Info 3171 [16:37:27.980] getCompletionData: Get current token: 0.06331601738929749 +Info 3172 [16:37:27.981] getCompletionData: Is inside comment: 0.3901129961013794 +Info 3173 [16:37:27.981] getCompletionData: Get previous token 1: 0.21139198541641235 +Info 3174 [16:37:27.981] getCompletionData: Get previous token 2: 0.18667200207710266 +Info 3175 [16:37:27.981] getCompletionsAtPosition: isCompletionListBlocker: 0.014774978160858154 +Info 3176 [16:37:28.006] getSymbolsFromOtherSourceFileExports: Using cached list +Info 3177 [16:37:28.110] getCompletionData: Semantic work: 128.17102998495102 +Info 3178 [16:37:28.188] getCompletionsAtPosition: getCompletionEntriesFromSymbols: 29.60421398282051 +Info 3179 [16:37:55.991] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3180 [16:37:56.042] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 437 structureChanged: false Elapsed: 51.01511099934578ms +Info 3181 [16:37:56.042] Different program with same set of files:: structureIsReused:: 2 +Info 3182 [16:37:58.344] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3183 [16:37:58.372] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 438 structureChanged: false Elapsed: 28.073082983493805ms +Info 3184 [16:37:58.372] Different program with same set of files:: structureIsReused:: 2 +Info 3185 [16:38:02.836] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3186 [16:38:02.867] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 439 structureChanged: false Elapsed: 30.813757002353668ms +Info 3187 [16:38:02.867] Different program with same set of files:: structureIsReused:: 2 +Info 3188 [16:38:03.045] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3189 [16:38:03.099] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 440 structureChanged: false Elapsed: 54.70244398713112ms +Info 3190 [16:38:03.100] Different program with same set of files:: structureIsReused:: 2 +Info 3191 [16:38:04.403] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3192 [16:38:04.435] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 441 structureChanged: false Elapsed: 31.248955011367798ms +Info 3193 [16:38:04.435] Different program with same set of files:: structureIsReused:: 2 +Info 3194 [16:38:05.330] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3195 [16:38:05.362] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 442 structureChanged: false Elapsed: 32.48845902085304ms +Info 3196 [16:38:05.362] Different program with same set of files:: structureIsReused:: 2 +Info 3197 [16:38:17.305] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3198 [16:38:17.337] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 443 structureChanged: false Elapsed: 31.031470000743866ms +Info 3199 [16:38:17.337] Different program with same set of files:: structureIsReused:: 2 +Info 3200 [16:38:20.200] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3201 [16:38:20.236] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 444 structureChanged: false Elapsed: 35.069238007068634ms +Info 3202 [16:38:20.236] Different program with same set of files:: structureIsReused:: 2 +Info 3203 [16:38:28.692] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3204 [16:38:28.736] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 445 structureChanged: false Elapsed: 44.035679012537ms +Info 3205 [16:38:28.736] Different program with same set of files:: structureIsReused:: 2 +Info 3206 [16:38:30.374] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3207 [16:38:30.416] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 446 structureChanged: false Elapsed: 41.687025994062424ms +Info 3208 [16:38:30.416] Different program with same set of files:: structureIsReused:: 2 +Info 3209 [16:38:31.998] Starting updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json +Info 3210 [16:38:32.048] Finishing updateGraphWorker: Project: /home/thomas/Projects/emacs/OrgRoamForceGraphReact/tsconfig.json Version: 447 structureChanged: false Elapsed: 49.40566900372505ms +Info 3211 [16:38:32.048] Different program with same set of files:: structureIsReused:: 2 diff --git a/app/components/graph/graph.tsx b/app/components/graph/graph.tsx index cef2a5e..cd623ee 100644 --- a/app/components/graph/graph.tsx +++ b/app/components/graph/graph.tsx @@ -36,7 +36,7 @@ export interface GraphProps { /** * Describe your component here */ -export const Graph = observer(function Graph(props: GraphProps) { +export const Graph = observer(function Graph(props: GraphProps): JSX.Element { const { style, physics, gData } = props const styles = flatten([CONTAINER, style]) @@ -80,14 +80,14 @@ export const Graph = observer(function Graph(props: GraphProps) { const getPrunedTree = useCallback(() => { const visibleNodes = [] const visibleLinks = [] - ;(function traverseTree(node = nodesById[rootId]) { - visibleNodes.push(node) - if (node.collapsed) return - visibleLinks.push(...node.childLinks) - node.childLinks - .map((link) => (typeof link.target === "object" ? link.target : nodesById[link.target])) // get child node - .forEach(traverseTree) - })() + ; (function traverseTree(node = nodesById[rootId]) { + visibleNodes.push(node) + if (node.collapsed) return + visibleLinks.push(...node.childLinks) + node.childLinks + .map((link) => (typeof link.target === "object" ? link.target : nodesById[link.target])) // get child node + .forEach(traverseTree) + })() return { nodes: visibleNodes, links: visibleLinks } }, [nodesById]) @@ -97,70 +97,82 @@ export const Graph = observer(function Graph(props: GraphProps) { const handleNodeClick = useCallback((node) => { node.collapsed = !node.collapsed // toggle collapse state setPrunedTree(getPrunedTree()) - }, []) + }, []); // Highlight Graph -const data = useMemo(() => { - // cross-link node objects - rando.links.forEach(link => { - const a = rando.nodes[link.source]; - const b = rando.nodes[link.target]; - !a.neighbors && (a.neighbors = []); - !b.neighbors && (b.neighbors = []); - a.neighbors.push(b); - b.neighbors.push(a); - - !a.links && (a.links = []); - !b.links && (b.links = []); - a.links.push(link); - b.links.push(link); - }); - - return rando; - }, []); -const [highlightNodes, setHighlightNodes] = useState(new Set()); - const [highlightLinks, setHighlightLinks] = useState(new Set()); - const [hoverNode, setHoverNode] = useState(null); - - const updateHighlight = () => { - setHighlightNodes(highlightNodes); - setHighlightLinks(highlightLinks); - }; - - const handleNodeHover = node => { - highlightNodes.clear(); - highlightLinks.clear(); - if (node) { - highlightNodes.add(node); - node.neighbors.forEach(neighbor => highlightNodes.add(neighbor)); - node.links.forEach(link => highlightLinks.add(link)); - } - - setHoverNode(node || null); - updateHighlight(); - }; - - const handleLinkHover = link => { - highlightNodes.clear(); - highlightLinks.clear(); - - if (link) { - highlightLinks.add(link); - highlightNodes.add(link.source); - highlightNodes.add(link.target); - } - - updateHighlight(); - }; - - const paintRing = useCallback((node, ctx) => { - // add ring just for highlighted nodes - ctx.beginPath(); - ctx.arc(node.x, node.y, NODE_R * 1.4, 0, 2 * Math.PI, false); - ctx.fillStyle = node === hoverNode ? 'red' : 'orange'; - ctx.fill(); - }, [hoverNode]); + /** +/* const data = useMemo(() => { +* // cross-link node objects +* rando.links.forEach(link => { +* const a = rando.nodes[link.source]; +* const b = rando.nodes[link.target]; +* !a.neighbors && (a.neighbors = []); +* !b.neighbors && (b.neighbors = []); +* a.neighbors.push(b); +* b.neighbors.push(a); +* +* !a.links && (a.links = []); +* !b.links && (b.links = []); +* a.links.push(link); +* b.links.push(link); +* }); +* +* return rando; +* }, []); +* const [highlightNodes, setHighlightNodes] = useState(new Set()); +* const [highlightLinks, setHighlightLinks] = useState(new Set()); +* const [hoverNode, setHoverNode] = useState(null); +* +* const updateHighlight = () => { +* setHighlightNodes(highlightNodes); +* setHighlightLinks(highlightLinks); +* }; +* +* const handleNodeHover = node => { +* highlightNodes.clear(); +* highlightLinks.clear(); +* if (node) { +* highlightNodes.add(node); +* node.neighbors.forEach(neighbor => highlightNodes.add(neighbor)); +* node.links.forEach(link => highlightLinks.add(link)); +* } +* +* setHoverNode(node || null); +* updateHighlight(); +* }; +* +* const handleLinkHover = link => { +* highlightNodes.clear(); +* highlightLinks.clear(); +* +* if (link) { +* highlightLinks.add(link); +* highlightNodes.add(link.source); +* highlightNodes.add(link.target); +* } +* +* updateHighlight(); +* }; +* +* const paintRing = useCallback((node, ctx) => { +* // add ring just for highlighted nodes +* ctx.beginPath(); +* ctx.arc(node.x, node.y, NODE_R * 1.4, 0, 2 * Math.PI, false); +* ctx.fillStyle = node === hoverNode ? 'red' : 'orange'; +* ctx.fill(); +* }, [hoverNode]); +*/ + + /* autoPauseRedraw={false} + linkWidth={link => highlightLinks.has(link) ? 5 : 1} + linkDirectionalParticles={4} + linkDirectionalParticleWidth={link => highlightLinks.has(link) ? 4 : 0} + nodeCanvasObjectMode={node => highlightNodes.has(node) ? 'before' : undefined} + nodeCanvasObject={paintRing} + onNodeHover={handleNodeHover} + onLinkHover={handleLinkHover} + nodeRelSize={NODE_R} */ return ( <View> @@ -175,19 +187,10 @@ const [highlightNodes, setHighlightNodes] = useState(new Set()); nodeColor={(node) => !node.childLinks.length ? "green" : node.collapsed ? "red" : "yellow" } - onNodeClick={!physics.collapse? null : handleNodeClick} + onNodeClick={!physics.collapse ? null : handleNodeClick} nodeLabel={(node) => "label"} - // nodeVal ={(node)=> node.childLinks.length * 0.5 + 1} + // nodeVal ={(node)=> node.childLinks.length * 0.5 + 1} //d3VelocityDecay={visco} - autoPauseRedraw={false} - linkWidth={link => highlightLinks.has(link) ? 5 : 1} - linkDirectionalParticles={4} - linkDirectionalParticleWidth={link => highlightLinks.has(link) ? 4 : 0} - nodeCanvasObjectMode={node => highlightNodes.has(node) ? 'before' : undefined} - nodeCanvasObject={paintRing} - onNodeHover={handleNodeHover} - onLinkHover={handleLinkHover} - nodeRelSize={NODE_R} /> ) : ( <ForceGraph3D @@ -201,10 +204,10 @@ const [highlightNodes, setHighlightNodes] = useState(new Set()); nodeColor={(node) => !node.childLinks.length ? "green" : node.collapsed ? "red" : "yellow" } - onNodeClick={!physics.collapse ? null : handleNodeClick } - nodeVal ={(node)=> node.childLinks.length + 1} - linkOpacity={0.8} - //d3VelocityDecay={visco} + onNodeClick={!physics.collapse ? null : handleNodeClick} + nodeVal={(node) => node.childLinks.length + 1} + linkOpacity={0.8} + //d3VelocityDecay={visco} /> )} </View> |