File tree Expand file tree Collapse file tree 5 files changed +8
-5
lines changed
Expand file tree Collapse file tree 5 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,8 @@ The label of a draw.io image block can be configured in the plugin settings.
8181
8282## Changelog
8383
84+ + v0.6.5
85+ + Fix: set label to none will not show edit button
8486+ v0.6.4
8587 + Feature: Add edit button to image right top
8688+ v0.6.3
Original file line number Diff line number Diff line change 7272
7373## 更新日志
7474
75+ + v0.6.5
76+ + 修复缺陷:设置不显示标签时图片右上角编辑按钮也不显示
7577+ v0.6.4
7678 + 新增功能:图片右上角编辑按钮
7779+ v0.6.3
Original file line number Diff line number Diff line change 11{
22 "name" : " siyuan-embed-drawio" ,
3- "version" : " 0.6.4 " ,
3+ "version" : " 0.6.5 " ,
44 "type" : " module" ,
55 "description" : " This is a plugin for siyuan" ,
66 "author" : " " ,
Original file line number Diff line number Diff line change 22 "name" : " siyuan-embed-drawio" ,
33 "author" : " Yuxin Zhao" ,
44 "url" : " https://github.com/YuxinZhaozyx/siyuan-embed-drawio" ,
5- "version" : " 0.6.4 " ,
5+ "version" : " 0.6.5 " ,
66 "minAppVersion" : " 3.0.0" ,
77 "disabledInPublish" : true ,
88 "backends" : [
Original file line number Diff line number Diff line change @@ -67,14 +67,13 @@ export default class DrawioPlugin extends Plugin {
6767 this . initSetting ( ) ;
6868
6969 this . _mutationObserver = this . setAddImageBlockMuatationObserver ( document . body , ( blockElement : HTMLElement ) => {
70- if ( this . data [ STORAGE_NAME ] . labelDisplay === "noLabel" ) return ;
71-
7270 const imageElement = blockElement . querySelector ( "img" ) as HTMLImageElement ;
7371 if ( imageElement ) {
7472 const imageURL = imageElement . getAttribute ( "data-src" ) ;
7573 this . getDrawioImageInfo ( imageURL , false ) . then ( ( imageInfo ) => {
7674 if ( imageInfo ) {
77- this . updateAttrLabel ( imageInfo , blockElement ) ;
75+ if ( this . data [ STORAGE_NAME ] . labelDisplay !== "noLabel" ) this . updateAttrLabel ( imageInfo , blockElement ) ;
76+
7877 const actionElement = blockElement . querySelector ( ".protyle-action" ) as HTMLElement ;
7978 if ( actionElement ) {
8079 const editBtnElement = HTMLToElement ( `<span aria-label="${ this . i18n . editDrawio } " data-position="4north" class="ariaLabel protyle-icon"><svg><use xlink:href="#iconEdit"></use></svg></span>` ) ;
You can’t perform that action at this time.
0 commit comments