Commit 85a07c4 1 parent 2612039 commit 85a07c4 Copy full SHA for 85a07c4
File tree 3 files changed +27
-0
lines changed
3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 55
55
"terminal-carbons" : {
56
56
"name" : " Show terminal carbons" ,
57
57
"description" : " Explictly draw terminal carbons like methyl or methylene."
58
+ },
59
+ "explicit-hydrogen" : {
60
+ "name" : " Explicit hydrogen" ,
61
+ "description" : " Enable to show explicit hydrogen."
58
62
}
59
63
},
60
64
"copy" : {
Original file line number Diff line number Diff line change 55
55
"terminal-carbons" : {
56
56
"name" : " 端基碳" ,
57
57
"description" : " 显式绘出末端甲基、亚甲基等端基碳。"
58
+ },
59
+ "explicit-hydrogen" : {
60
+ "name" : " 显式氢" ,
61
+ "description" : " 启用以绘制显式氢原子。"
58
62
}
59
63
},
60
64
"copy" : {
Original file line number Diff line number Diff line change @@ -181,6 +181,25 @@ export class ChemSettingTab extends PluginSettingTab {
181
181
} )
182
182
) ;
183
183
184
+ new Setting ( containerEl )
185
+ . setName ( i18n . t ( 'settings.advanced.explicit-hydrogen.name' ) )
186
+ . setDesc ( i18n . t ( 'settings.advanced.explicit-hydrogen.description' ) )
187
+ . addToggle ( ( toggle ) =>
188
+ toggle
189
+ . setValue (
190
+ this . plugin . settings . options ?. explicitHydrogens ?? false
191
+ )
192
+ . onChange ( async ( value ) => {
193
+ this . plugin . settings . options . explicitHydrogens = value ;
194
+ await this . plugin . saveSettings ( ) ;
195
+ setDrawer ( {
196
+ ...DEFAULT_SD_OPTIONS ,
197
+ ...this . plugin . settings . options ,
198
+ } ) ;
199
+ onSettingsChange ( ) ;
200
+ } )
201
+ ) ;
202
+
184
203
new Setting ( containerEl )
185
204
. setName ( i18n . t ( 'settings.copy.title' ) )
186
205
. setHeading ( ) ;
You can’t perform that action at this time.
0 commit comments