Mapbox "fitBounds" handling
未关闭
还没有人认领这个 Issue。
- 主要语言
- R
- 星标
- 2.7k
- 派生
- 641
- PR 合并指标
- 30 天内没有已合并 PR
描述
I believe the if(!args) check should be changed (or the parameter for args should default to null or some other calculated default, not {}) as it currently causes an "e is undefined" error in mapbox (where e is the 2nd parameter).
I've got around it by explicitly providing a mapbox = list(_fitBounds = list(c(xmin, ymin), c(xmax, ymax)), options = list()) entry in my plotly::layout call.
This also serves as a reminder that the fitBounds doesn't seem to work for restyle either.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 inst/htmlwidgets/plotly.js 的第 206–220 行开始,重点关注 fitBounds 参数的默认值,以及产生第二个参数为 undefined 错误的 Mapbox 调用。分别在有和没有显式 mapbox 选项列表的情况下复现该问题,然后验证 fitBounds 在 restyle 期间也能正常工作。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, r
- 领域
- data-visualization, frontend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100