if ((p) && (p[0] >= minX) && (p[0] < maxX) && (p[1] >= minY) && (p[
        1] < maxY) && (p[2].parent) && (label.parent.patternIds === p[2]