@datagrok/helm 2.8.2 → 2.8.3

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@datagrok/helm",
3
3
  "friendlyName": "Helm",
4
- "version": "2.8.2",
4
+ "version": "2.8.3",
5
5
  "author": {
6
6
  "name": "Maria Dolotova",
7
7
  "email": "mdolotova@datagrok.ai"
@@ -40,6 +40,18 @@ export class HelmService extends HelmServiceBase {
40
40
  this.editorLruCache = new LRUCache<string, HelmEditor>({max: 20});
41
41
  }
42
42
 
43
+ private getNewEditorHost() {
44
+ const hostDiv = ui.box();
45
+ hostDiv.style.position = 'absolute';
46
+ hostDiv.style.left = '0px';
47
+ hostDiv.style.right = '0px';
48
+ hostDiv.style.width = '0px';
49
+ hostDiv.style.height = '0px';
50
+ hostDiv.style.visibility = 'hidden';
51
+ this.hostDiv.appendChild(hostDiv);
52
+ return hostDiv;
53
+ }
54
+
43
55
  protected override toLog(): string {
44
56
  return `Helm: ${super.toLog()}`;
45
57
  }
@@ -50,7 +62,8 @@ export class HelmService extends HelmServiceBase {
50
62
  let resEditor: HelmEditor | undefined = this.editorLruCache.get(editorKey);
51
63
  if (!resEditor) {
52
64
  const getMonomerFuncs = _package.helmHelper.buildMonomersFuncsFromLib(props.monomerLib, );
53
- resEditor = new JSDraw2.Editor<HelmType, IHelmBio, IHelmEditorOptions>(this.hostDiv, {
65
+ const hostDiv = this.getNewEditorHost();
66
+ resEditor = new JSDraw2.Editor<HelmType, IHelmBio, IHelmEditorOptions>(hostDiv, {
54
67
  width: props.width, height: props.height, skin: 'w8', viewonly: true,
55
68
  drawOptions: {getMonomer: getMonomerFuncs.getMonomer},
56
69
  });