Explorar o código

disable perfMode temp

AykutSarac %!s(int64=2) %!d(string=hai) anos
pai
achega
29a217633b

+ 3 - 1
src/components/CustomNode/ObjectNode.tsx

@@ -4,6 +4,8 @@ import useConfig from "src/hooks/store/useConfig";
 import { useInViewport } from "react-in-viewport";
 import * as Styled from "./styles";
 
+const inViewport = true;
+
 const ObjectNode: React.FC<CustomNodeProps<[string, string][]>> = ({
   width,
   height,
@@ -12,7 +14,7 @@ const ObjectNode: React.FC<CustomNodeProps<[string, string][]>> = ({
   y,
 }) => {
   const ref = React.useRef(null);
-  const { inViewport } = useInViewport(ref);
+  // const { inViewport } = useInViewport(ref);
   const performanceMode = useConfig((state) => state.performanceMode);
 
   return (

+ 3 - 1
src/components/CustomNode/TextNode.tsx

@@ -8,6 +8,8 @@ import useStored from "src/hooks/store/useStored";
 import styled from "styled-components";
 import * as Styled from "./styles";
 
+const inViewport = true;
+
 const StyledExpand = styled.button`
   pointer-events: all;
   position: absolute;
@@ -39,7 +41,7 @@ const TextNode: React.FC<
   y,
 }) => {
   const ref = React.useRef(null);
-  const { inViewport } = useInViewport(ref);
+  // const { inViewport } = useInViewport(ref);
   const performanceMode = useConfig((state) => state.performanceMode);
 
   const hideCollapse = useStored((state) => state.hideCollapse);