For example:
<img width="1904" alt="Screen Shot 2021-11-05 at 11 59 05 AM" src="https://user-images.githubusercontent.com/29597/140540816-25d6d47b-7aea-4121-aeaa-565accc65b1f.png">

context.clip();
    }
    context.fillStyle = COLORS.REACT_RESIZE_BAR_BORDER;
    context.fillRect(
      imageRect.origin.x,
      imageRect.origin.y,
      imageRect.size.width,
      imageRect.size.height,
    );
    
    context.drawImage(
      snapshot.image,
      
      0,
      0,
      
      snapshot.width,
      snapshot.height,
      
      imageRect.origin.x + BORDER_SIZE,
      imageRect.origin.y + BORDER_SIZE,
      
      imageRect.size.width - BORDER_SIZE * 2,
      imageRect.size.height - BORDER_SIZE * 2,
    );
    if (shouldClip) {
      context.restore();
    }
  }
  _findClosestSnapshot(x: number): Snapshot | null {