openchemlib 8.16.0 → 8.17.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.
@@ -10,7 +10,6 @@ function initCanvasEditor(
10
10
  Reaction,
11
11
  ) {
12
12
  class CanvasEditor {
13
- #isReadOnly;
14
13
  #editorArea;
15
14
  // Can be useful for debugging.
16
15
  /* eslint-disable no-unused-private-class-members */
@@ -22,7 +21,6 @@ function initCanvasEditor(
22
21
  #destroy;
23
22
 
24
23
  constructor(parentElement, options = {}) {
25
- const { readOnly = false } = options;
26
24
  const { editorArea, toolbar, uiHelper, destroy } = createEditor(
27
25
  parentElement,
28
26
  options,
@@ -33,7 +31,6 @@ function initCanvasEditor(
33
31
  Molecule,
34
32
  Reaction,
35
33
  );
36
- this.#isReadOnly = readOnly;
37
34
  this.#editorArea = editorArea;
38
35
  this.#toolbar = toolbar;
39
36
  this.#uiHelper = uiHelper;
@@ -82,8 +79,6 @@ function initCanvasEditor(
82
79
  setOnChangeListener(onChange) {
83
80
  this.#checkNotDestroyed();
84
81
 
85
- if (this.#isReadOnly) return;
86
-
87
82
  this.#onChange = onChange;
88
83
  }
89
84
 
@@ -120,7 +115,6 @@ function initCanvasEditor(
120
115
  * @param {{ what: number; isUserEvent: boolean; }} event
121
116
  */
122
117
  #handleChange(event) {
123
- if (this.#isReadOnly) return;
124
118
  if (!this.#onChange) return;
125
119
 
126
120
  const { what, isUserEvent } = event;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openchemlib",
3
- "version": "8.16.0",
3
+ "version": "8.17.0",
4
4
  "description": "Manipulate molecules",
5
5
  "keywords": [
6
6
  "chemistry",