Trig toggles by mouse-dragged / touch-moved

Hi!
I trying to archive a kind of draw-mode on a matrix of toggles.
The toggle class is originally made to be used within void mousePressed ()
I’m trying to convert the toggle to insert it into void touchMoved

To also trig toggles when the mouse is dragging or touch is moving and not only the first one toggle when the mouse was pressed or touch started.

Currently i trying to add a boolean variable called “ready” to avoid wrong behaviour of the toggle state that is pressed.

Is there anyone who can help me to understand how to?
Thanks

int block, sub, area;
Toggle[] raw = new Toggle[8];
boolean ready;
void setup() {
  fullScreen(); 
  block = width/8;
  sub = block/11;
  area = block-(sub*2);
  for ( int x = 0; x < 8; x++ ) {
    raw[x] = new Toggle( x*block +block, 0);
  }
}

void draw() {
  for ( int x = 0; x < 8; x++ ) {
    raw[x].display();
  }
}

void touchMoved() {
  for ( int x = 0; x < 8; x++ ) {
  raw[x].click(mouseX, mouseY);

  }
}

class Toggle {    
  int x;   
  int y;     
  boolean on;
  int delta;
  Toggle(int tempX, int tempY) {    
    x  = tempX;   
    y  = tempY;     
    on = false;
    ready = true;
  }    
  void click(int mx, int my) {
    // Check to see if a point is inside the rectangle
    if (ready && mx > x && mx < x + block && my > y && my < y + block) {
        on = !on;
        ready = false;
    }else{ready = true;}
  }
  void display() {
    if (on) {
      fill(95+delta);
    } else {
      fill(63+delta);
    }
    rect(x+sub, y+sub, area, area);
  }
}