0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

gitbucket-drawio-plugin で設定にかかわらず図形クリック時に本家へ飛んでいたのを修正しました

0
Last updated at Posted at 2025-12-05

概要

GitBucket のプラグイン gitbucket-drawio-plugin が長らくメンテナンスされておらず、動作していなかったのを非公式に修正しています。

今回、表示された draw.io の図形をクリックしたところ、設定にかかわらず、本家へ飛ぶのを修正しました。

これまでの流れ

本家と異なり、設定により、セルフホストの draw.io を利用することができます。

修正内容

src\main\scala\DrawioRenderer.scala

diff --git a/src/main/scala/DrawioRenderer.scala b/src/main/scala/DrawioRenderer.scala
index d7469f6..f8d0941 100644
--- a/src/main/scala/DrawioRenderer.scala
+++ b/src/main/scala/DrawioRenderer.scala
@@ -36,6 +36,8 @@ class DrawioRenderer extends Renderer with DrawioSettingsService {
        |<link rel="stylesheet" type="text/css" href="$path/plugin-assets/drawio/drawio-renderer.css">
        |<script>
        |window.DRAWIO_BASE_URL = '$baseUrl';
+       |window.DRAWIO_LIGHTBOX_URL = '$baseUrl';
+       |window.DRAWIO_VIEWER_URL = '$baseUrl';
        |window.DRAW_MATH_URL = '$baseUrl' + 'math/es5';
        |</script>
        |<script src="$viewer"></script>

これまで window.DRAWIO_BASE_URL の設定変更で描画にセルフホストの draw.io を使用できていました。

描画されたダイアグラムをクリックした際に飛ぶリンク先は、window.DRAWIO_LIGHTBOX_URL を設定しないといけなかったようです。

修正版の入手方法

Release Fixed behavior when clicking on diagram · yasumichi/gitbucket-drawio-plugin から、 gitbucket-drawio-plugin-0.2.1.jar をダウンロードしてください。

セルフホスト版 draw.io の入手先

Releases · jgraph/drawio から、draw.war をダウンロードしてください。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?