Problem with Entity selection

Hey, everybody. I am creating an Entity and adding ModelGraphics and PolylineGraphics to it. I have a Polyline coming from the model. When I click on the model, which is at the coordinates of the Entity, the middle of the Polyline is highlighted with a green indicator. How can I fix this behavior so that it is the model that is highlighted with the green indicator?

let entity = new Entity({
          id: item.UID,
          position: Cartesian3.fromDegrees(
            item!.L * Math.DEGREES_PER_RADIAN,
            item!.B * Math.DEGREES_PER_RADIAN,
            item!.H
          ) as Cartesian3,
          orientation: new CallbackProperty(() => {
            return orientation;
          }, false),
          model: model,
          objectType: objectType,
        });
        if (objectType === EntitiesTypes.Air) {
          //Создаётся проекция пути летательного объекта
          let wall = new WallGraphics({
            material: MColor(item.color, 0.1),
            outline: true,
            outlineColor: Color.GREY,
            show: false,
            positions: new CallbackProperty(() => {
              let points
              if (objectType === EntitiesTypes.Air) {
                points = WallData!.get(item!.UID)
              }
              return Cartesian3.fromDegreesArrayHeights(points);
            }, false),
          })
           let model = new ModelGraphics({
          uri: objectType === EntitiesTypes.A ? a : ea,
          minimumPixelSize: 128,
          maximumScale: 80,
          scale: 1.5,
          shadows: objectType === EntitiesTypes.A ? ShadowMode.ENABLED : ShadowMode.DISABLED,
          color: MColor((objectType === EntitiesTypes.A ? item.color : item.icon_color), 1),
          colorBlendMode: ColorBlendMode.REPLACE,
        });
          let polyline = new PolylineGraphics({
            positions: new CallbackProperty(() => {
              let points = WallData!.get(item!.UID)
              let arrayHeights = [
                points[points.length - 3],
                points[points.length - 2],
                points[points.length - 1],
                points[points.length - 3], 
                points[points.length - 2], 
                0
              ]
              return Cartesian3.fromDegreesArrayHeights(arrayHeights)
            }, false),
            show: false
          })
          entity.wall = wall;
          entity.polyline = polyline
          entity.model = model

Hi there,

I don’t think the Entity API provides the ability to enable and disable picking individually. I would suggest trying the lower-level Primitive API, which will allow for more control over picking behavior.