mapbox/mapbox-gl-js

Dash line has a tail with` round`line cap

開放

#10,218 建立於 2020年12月16日

 (0 則留言) (0 個反應) (1 位負責人)JavaScript (2,203 個分叉)batch import
bug :lady_beetle:good first issue

倉庫指標

星標
 (10,532 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

mapbox-gl-js version: v.1.x

Steps to Trigger Behavior

Use the following style, the rendered dash line has a redundant tail

{
"version": 8,
"metadata": {
  "test": {
    "width": 64,
    "height": 64
  }
},
"sources": {
  "geojson": {
    "type": "geojson",
    "data": {
      "type": "LineString",
      "coordinates": [
        [
          -10,
          0
        ],
        [
          10,
          0
        ]
      ]
    }
  }
},
"layers": [
  {
    "id": "line",
    "type": "line",
    "source": "geojson",
    "layout": {
      "line-cap": "round"
    },
    "paint": {
      "line-width": 8,
      "line-dasharray": [1, -2, -1, 1],
      "line-color": "blue"
    }
  }
]
}

Expected Behavior

dash line is rendered without tail.

Actual Behavior

cc: @zmiao

貢獻者指南