vitessce-python icon indicating copy to clipboard operation
vitessce-python copied to clipboard

`widget_from_dict.ipynb`: Scatterplots not rendering

Open mccalluc opened this issue 4 years ago • 1 comments

When I run widget_from_dict.ipynb, the two scatterplots are consistently not loading for me:

screenshot Screen Shot 2021-06-15 at 1 44 58 PM
stacktrace?

In the console, there is an error... but it seems to come before any data is fetched, so not sure whether it's related:

Uncaught TypeError: divRef.current is null
    VitessceWidget labplugin.js:277
    callCallback labplugin.js:6796
    invokeGuardedCallbackDev labplugin.js:6845
    invokeGuardedCallback labplugin.js:6907
    flushPassiveEffectsImpl labplugin.js:26389
    unstable_runWithPriority labplugin.js:29992
    runWithPriority$1 labplugin.js:14127
    flushPassiveEffects labplugin.js:26293
    enqueuePendingPassiveHookEffectUnmount labplugin.js:26325
    workLoop labplugin.js:29941
    flushWork labplugin.js:29914
    performWorkUntilDeadline labplugin.js:29681

labplugin.js:277 is the last line here:

   if (!divRef.current) {
      return function () {};
    }

    function handleMouseEnter() {
      var jpn = divRef.current.closest('.jp-Notebook');

      if (jpn) {
        jpn.style.overflow = "hidden";
      }
    }

    function handleMouseLeave(event) {
      var _event$relatedTarget$;

      if (event.relatedTarget === null || event.relatedTarget && ((_event$relatedTarget$ = event.relatedTarget.closest('.jp-Notebook')) === null || _event$relatedTarget$ === void 0 ? void 0 : _event$relatedTarget$.length)) return;
      var jpn = divRef.current.closest('.jp-Notebook');

      if (jpn) {
        jpn.style.overflow = "auto";
      }
    }

    divRef.current.addEventListener("mouseenter", handleMouseEnter);
    divRef.current.addEventListener("mouseleave", handleMouseLeave);
    return function () {
      divRef.current.removeEventListener("mouseenter", handleMouseEnter);

mccalluc avatar Jun 15 '21 17:06 mccalluc

Thanks, potentially related to #68

keller-mark avatar Jun 15 '21 18:06 keller-mark