[Bug]: a layout legend's title longer than its box runs past it

オープン 初心者向け
#3,129 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@choupeanut がすでに取り組んでいます。

2026年11月28日 から。

  • #3188 @choupeanut による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust

調査の方向性

crates/render/src/layout/legend.rs の legend_missing から始め、カラーバーのタイトルがどのように折り返されるかを比較してください(issue #2493)。幅が約 50 mm の凡例と、手順にある長いタイトルで再現してください。凡例のタイトルが枠内で折り返され、行がタイトルの最後の行の下から始まれば完了です。

索引モデルが issue の本文から書いたものです。

説明

unconfirmed possible issue
Before you start
  • I searched the existing issues and did not find a duplicate.
  • This is a bug report, not a usage question (questions belong in Discussions).
What happened?

A layout legend draws its title on one line, so a title wider than the legend's box runs past it. A colorbar's title wraps to its box (#2493); a legend's doesn't. Found reading the code (legend_missing in crates/render/src/layout/legend.rs) while reviewing #3127.

Steps to reproduce
  1. Make a layout with a map frame and add a legend about 50 mm wide.
  2. Give it a long title: layout.update {"element": <legend>, "title": "A very long legend title that is much wider than the legend itself"}.
Expected behavior

The title wraps to the box, and the rows start under its last line, as a colorbar's title does.

How are you running RustGIS?

All builds: the drawing is shared.

Version

main (0.8.0)

主要言語
Rust
スター
1.9k
フォーク
268
平均マージ
8時間 21分
マージ済み PR(30日)
936

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

opengeos/RustGIS のほかの issue

opengeos/RustGIS の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。