tweak: squiggle chart on link hover
This commit is contained in:
		
							parent
							
								
									a1c255b2d3
								
							
						
					
					
						commit
						265908d3c5
					
				| 
						 | 
					@ -24,21 +24,15 @@ const effectButtonStyle =
 | 
				
			||||||
  "bg-transparent m-2 hover:bg-blue-500 text-blue-700 font-semibold hover:text-white py-2 px-4 border border-blue-500 hover:border-transparent rounded mt-5";
 | 
					  "bg-transparent m-2 hover:bg-blue-500 text-blue-700 font-semibold hover:text-white py-2 px-4 border border-blue-500 hover:border-transparent rounded mt-5";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export function DynamicSquiggleChart({ link, stopShowing }) {
 | 
					export function DynamicSquiggleChart({ link, stopShowing }) {
 | 
				
			||||||
 | 
					  if (link == null) {
 | 
				
			||||||
 | 
					    return "";
 | 
				
			||||||
 | 
					  } else {
 | 
				
			||||||
    let usefulLink = {
 | 
					    let usefulLink = {
 | 
				
			||||||
      source: link.source,
 | 
					      source: link.source,
 | 
				
			||||||
      target: link.target,
 | 
					      target: link.target,
 | 
				
			||||||
      squiggleString: link.squiggleString,
 | 
					      squiggleString: link.squiggleString,
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  return link == null ? (
 | 
					    return (
 | 
				
			||||||
    ""
 | 
					 | 
				
			||||||
  ) : (
 | 
					 | 
				
			||||||
    /*{
 | 
					 | 
				
			||||||
          <div className="grid grid-cols-1 grid-rows-1 place-items-center">
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
     
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      }*/
 | 
					 | 
				
			||||||
      <div className="">
 | 
					      <div className="">
 | 
				
			||||||
        <textarea
 | 
					        <textarea
 | 
				
			||||||
          value={JSON.stringify(usefulLink, null, 4)}
 | 
					          value={JSON.stringify(usefulLink, null, 4)}
 | 
				
			||||||
| 
						 | 
					@ -55,13 +49,7 @@ export function DynamicSquiggleChart({ link, stopShowing }) {
 | 
				
			||||||
          showSummary={true}
 | 
					          showSummary={true}
 | 
				
			||||||
          showTypes={true}
 | 
					          showTypes={true}
 | 
				
			||||||
        />
 | 
					        />
 | 
				
			||||||
      <button className={effectButtonStyle} onClick={() => stopShowing()}>
 | 
					        {/*
 | 
				
			||||||
        Hide chart
 | 
					 | 
				
			||||||
      </button>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
  );
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    /*
 | 
					 | 
				
			||||||
            SquiggleChart props:
 | 
					            SquiggleChart props:
 | 
				
			||||||
            squiggleString?: string;
 | 
					            squiggleString?: string;
 | 
				
			||||||
            sampleCount?: number;
 | 
					            sampleCount?: number;
 | 
				
			||||||
| 
						 | 
					@ -75,6 +63,12 @@ export function DynamicSquiggleChart({ link, stopShowing }) {
 | 
				
			||||||
            showSummary?: boolean;
 | 
					            showSummary?: boolean;
 | 
				
			||||||
            showTypes?: boolean;
 | 
					            showTypes?: boolean;
 | 
				
			||||||
            showControls?: boolean;
 | 
					            showControls?: boolean;
 | 
				
			||||||
    */
 | 
					        */}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <button className={effectButtonStyle} onClick={() => stopShowing()}>
 | 
				
			||||||
 | 
					          Hide chart
 | 
				
			||||||
 | 
					        </button>
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								packages/webpage-refactor/public/example-graph-and-squiggle.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								packages/webpage-refactor/public/example-graph-and-squiggle.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 231 KiB  | 
		Loading…
	
		Reference in New Issue
	
	Block a user