tapDown method

void tapDown(
  1. TapDownDetails details
)

Implementation

void tapDown(TapDownDetails details){
  // // print("${details.globalPosition.dx-w/2} . ${details.globalPosition.dy-radarMap.radius-top}");
  // print("${details.localPosition.dx-w/2} . ${details.localPosition.dy-radarMap.radius-top}");
  // print("${node[0].left},${node[0].right},${node[0].top},${node[0].bottom}");
  // // print("${details.globalPosition.dx} . ${details.globalPosition.dy}");
  // // print("${details.localPosition.dx} . ${details.localPosition.dy}");
  // // print("${node.length}");
  for (int i=0;i< node.length;i++) {
    // print("${node[i].left} . ${node[i].top}");
    var n = node[i];
    var x = details.localPosition.dx-w/2;
    var y = details.localPosition.dy-radarMap.radius-top;

    if(x>=n.left && x<=n.right && y>=n.top&&y<=n.bottom){
      tab..x=(x+skewing)..y=y..index=i;
      return;
    }
  }
  tab.reset();
}