     /*
      *  三角形：方向标识
      */
-    func directFlag(_ context: CGContext, rect: CGRect) {
+    func directFlag(rect: CGRect) {
         // 新建路径：三角形
         let trianglePathM = UIBezierPath()
         let marginSelectedCirclev: CGFloat = 4

        return layer as? CAShapeLayer
    }

    var mainPath = UIBezierPath()

    override func draw(_ rect: CGRect) {
        // 上下文属性设置

        let rightPointX = topX + w * 0.5
        trianglePathM.addLine(to: CGPoint(x: rightPointX, y: leftPointY))

        mainPath.append(trianglePathM)
        trianglePathM.fill()
        shapeLayer?.path = mainPath.cgPath
