openchemlib 8.19.0 → 8.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * openchemlib - Manipulate molecules
3
- * @version v8.19.0
4
- * @date 2025-03-14T08:06:38.354Z
3
+ * @version v8.20.0
4
+ * @date 2025-04-10T10:19:19.314Z
5
5
  * @link https://github.com/cheminfo/openchemlib-js
6
6
  * @license BSD-3-Clause
7
7
  */
@@ -5533,11 +5533,11 @@ _.applyTransformation_0 = function applyTransformation(t){
5533
5533
  _.calculateParameters = function calculateParameters(){
5534
5534
  var averageBondLength;
5535
5535
  averageBondLength = this.mTransformation.getScaling() * (this.mAtomLabelAVBL != 0?this.mAtomLabelAVBL:this.mMol.getAverageBondLength_0());
5536
- this.mpLineWidth = averageBondLength * 0.06;
5537
- this.mpBondSpacing = averageBondLength * 0.15;
5536
+ this.mpLineWidth = averageBondLength * carc2.cFactorLineWidth;
5537
+ this.mpBondSpacing = averageBondLength * carc2.cFactorBondSpacing;
5538
5538
  this.mpBondHiliteRadius = averageBondLength * 0.38;
5539
5539
  this.mpExcludeGroupRadius = averageBondLength * 0.47;
5540
- this.mpLabelSize = round_int(averageBondLength * this.mFactorTextSize * 0.6 + 0.5);
5540
+ this.mpLabelSize = round_int(averageBondLength * this.mFactorTextSize * carc2.cFactorTextSize + 0.5);
5541
5541
  this.mpDotDiameter = averageBondLength * 0.12;
5542
5542
  this.mpQFDiameter = averageBondLength * 0.4;
5543
5543
  this.mChiralTextSize = averageBondLength * 0.5 + 0.5;
@@ -8118,7 +8118,7 @@ _.locateDelocalizedDoubleBonds_0 = function locateDelocalizedDoubleBonds_0(isDel
8118
8118
  return true;
8119
8119
  if (mayChangeAtomCharges)
8120
8120
  for (atom0 = 0; atom0 < this.mMol.getAtoms_0(); atom0++)
8121
- if (this.mIsDelocalizedAtom[atom0] && this.mMol.getAtomicNo_0(atom0) == 7 && this.mMol.getConnAtoms_0(atom0) == 3)
8121
+ if (this.mIsDelocalizedAtom[atom0] && this.mMol.getAtomicNo_0(atom0) == 7 && (this.mIsDelocalizedBridgeHead[atom0] || this.mMol.getConnAtoms_0(atom0) == 3 && !this.mIsDelocalizedFiveRingMember[atom0]))
8122
8122
  this.mMol.setAtomCharge_0(atom0, 1);
8123
8123
  this.mAllHydrogensAreExplicit = allHydrogensAreExplicit;
8124
8124
  this.protectFullValenceAtoms(mayChangeAtomCharges);
@@ -46341,6 +46341,12 @@ _.eventHappened_2 = function eventHappened_7(e){
46341
46341
  else if (e.getKey() == -6 || this.mCurrentHiliteAtom == -1 && e.getKey() == 63) {
46342
46342
  this.showHelpDialog_0();
46343
46343
  return;
46344
+ }
46345
+ else if (e.getKey() == -8) {
46346
+ if (this.mAtomKeyStrokeBuffer.length_0() != 0) {
46347
+ this.expandAtomKeyStrokes(this.mAtomKeyStrokeBuffer.toString_0());
46348
+ this.mAtomKeyStrokeBuffer.setLength(0);
46349
+ }
46344
46350
  }
46345
46351
  else if (this.mCurrentHiliteBond != -1) {
46346
46352
  ch_0 = e.getKey();
@@ -46666,6 +46672,9 @@ _.expandAtomKeyStrokes = function expandAtomKeyStrokes(keyStrokes){
46666
46672
  this.updateAndFireEvent(3);
46667
46673
  return;
46668
46674
  }
46675
+ else {
46676
+ this.update(0);
46677
+ }
46669
46678
  }
46670
46679
  if (jsNotEquals(this.mAtomKeyStrokeSuggestion, null) && !jl.isEmpty__Z__devirtual$(this.mAtomKeyStrokeSuggestion))
46671
46680
  keyStrokes = this.mAtomKeyStrokeSuggestion;
@@ -49156,6 +49165,7 @@ cargg.$clinit_GenericKeyEvent = function $clinit_GenericKeyEvent(){
49156
49165
  cargg.KEY_BACK_SPACE = -5;
49157
49166
  cargg.KEY_HELP = -6;
49158
49167
  cargg.KEY_ESCAPE = -7;
49168
+ cargg.KEY_ENTER = -8;
49159
49169
  }
49160
49170
  ;
49161
49171
  cargg.GenericKeyEvent = function GenericKeyEvent(what, key, isAltDown, isCtrlDown, isShiftDown, isMenuShortcut, source){
@@ -49198,6 +49208,7 @@ cargg.KEY_ALT = 0;
49198
49208
  cargg.KEY_BACK_SPACE = 0;
49199
49209
  cargg.KEY_CTRL = 0;
49200
49210
  cargg.KEY_DELETE = 0;
49211
+ cargg.KEY_ENTER = 0;
49201
49212
  cargg.KEY_ESCAPE = 0;
49202
49213
  cargg.KEY_HELP = 0;
49203
49214
  cargg.KEY_PRESSED = 1;
@@ -58874,12 +58885,14 @@ _.$init_279 = function $init_279(){
58874
58885
  ;
58875
58886
  _.add_8 = function add_17(c, x_0, y_0){
58876
58887
  var jsDialog = this.getJsDialog();
58877
- return jsDialog.add(c, x_0, y_0);
58888
+ var jsComponent = c.getJsComponent();
58889
+ return jsDialog.add(jsComponent, x_0, y_0);
58878
58890
  }
58879
58891
  ;
58880
58892
  _.add_9 = function add_18(c, x1, y1, x2, y2){
58881
58893
  var jsDialog = this.getJsDialog();
58882
- return jsDialog.add(c, x1, y1, x2, y2);
58894
+ var jsComponent = c.getJsComponent();
58895
+ return jsDialog.add(jsComponent, x1, y1, x2, y2);
58883
58896
  }
58884
58897
  ;
58885
58898
  _.createCheckBox_0 = function createCheckBox(text_0){
@@ -59258,6 +59271,7 @@ carggg.KEY_ALT_0 = -2;
59258
59271
  carggg.KEY_BACK_SPACE_0 = -5;
59259
59272
  carggg.KEY_CTRL_0 = -1;
59260
59273
  carggg.KEY_DELETE_0 = -4;
59274
+ carggg.KEY_ENTER_0 = -8;
59261
59275
  carggg.KEY_ESCAPE_0 = -7;
59262
59276
  carggg.KEY_EVENT_PRESSED = 1;
59263
59277
  carggg.KEY_EVENT_RELEASED = 2;
@@ -101402,6 +101416,7 @@ _.KEY_ALT = carggg.KEY_ALT_0;
101402
101416
  _.KEY_BACK_SPACE = carggg.KEY_BACK_SPACE_0;
101403
101417
  _.KEY_CTRL = carggg.KEY_CTRL_0;
101404
101418
  _.KEY_DELETE = carggg.KEY_DELETE_0;
101419
+ _.KEY_ENTER = carggg.KEY_ENTER_0;
101405
101420
  _.KEY_ESCAPE = carggg.KEY_ESCAPE_0;
101406
101421
  _.KEY_EVENT_PRESSED = carggg.KEY_EVENT_PRESSED;
101407
101422
  _.KEY_EVENT_RELEASED = carggg.KEY_EVENT_RELEASED;
@@ -101829,7 +101844,7 @@ $gwt && $gwt.permProps && __gwtModuleFunction.__moduleStartupDone($gwt.permProps
101829
101844
 
101830
101845
  var toReturn = $wnd["OCL"];
101831
101846
 
101832
- toReturn.version = '8.19.0';
101847
+ toReturn.version = '8.20.0';
101833
101848
 
101834
101849
  return toReturn;
101835
101850
  }