@datagrok/helm 2.0.6 → 2.0.7
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
package/src/helm-web-editor.ts
CHANGED
|
@@ -3,16 +3,23 @@ import * as ui from 'datagrok-api/ui';
|
|
|
3
3
|
import * as DG from 'datagrok-api/dg';
|
|
4
4
|
|
|
5
5
|
export class HelmWebEditor {
|
|
6
|
-
editorView: any;
|
|
7
|
-
webEditor: any;
|
|
8
6
|
host: any;
|
|
9
7
|
editor: any;
|
|
10
8
|
w = 200;
|
|
11
9
|
h = 100;
|
|
12
10
|
constructor() {
|
|
13
|
-
this.
|
|
11
|
+
this.host = ui.div([], {style: {width: `${this.w}px`, height: `${this.h}px`}});
|
|
12
|
+
this.editor = new JSDraw2.Editor(this.host, {width: this.w, height: this.h, viewonly: true});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
resizeEditor(w: number, h: number) {
|
|
16
|
+
this.editor.setSize(w, h);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
createWebEditor(value: string) {
|
|
20
|
+
const editorView = ui.div();
|
|
14
21
|
org.helm.webeditor.MolViewer.molscale = 0.8;
|
|
15
|
-
|
|
22
|
+
const webEditor = new scil.helm.App(editorView, {
|
|
16
23
|
showabout: false,
|
|
17
24
|
mexfontsize: '90%',
|
|
18
25
|
mexrnapinontab: true,
|
|
@@ -22,24 +29,22 @@ export class HelmWebEditor {
|
|
|
22
29
|
mexfavoritefirst: true,
|
|
23
30
|
mexfilter: true
|
|
24
31
|
});
|
|
25
|
-
const sizes =
|
|
26
|
-
|
|
32
|
+
const sizes = webEditor.calculateSizes();
|
|
33
|
+
webEditor.canvas.resize(sizes.rightwidth - 100, sizes.topheight - 210);
|
|
27
34
|
let s = {width: sizes.rightwidth - 100 + 'px', height: sizes.bottomheight + 'px'};
|
|
28
35
|
//@ts-ignore
|
|
29
|
-
scil.apply(
|
|
36
|
+
scil.apply(webEditor.sequence.style, s);
|
|
30
37
|
//@ts-ignore
|
|
31
|
-
scil.apply(
|
|
32
|
-
s = {width: sizes.rightwidth + 'px', height: (sizes.bottomheight +
|
|
38
|
+
scil.apply(webEditor.notation.style, s);
|
|
39
|
+
s = {width: sizes.rightwidth + 'px', height: (sizes.bottomheight + webEditor.toolbarheight) + 'px'};
|
|
33
40
|
//@ts-ignore
|
|
34
|
-
scil.apply(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
resizeEditor(w: number, h: number) {
|
|
42
|
-
this.editor.setSize(w, h);
|
|
41
|
+
scil.apply(webEditor.properties.parent.style, s);
|
|
42
|
+
webEditor.structureview.resize(sizes.rightwidth, sizes.bottomheight + webEditor.toolbarheight);
|
|
43
|
+
webEditor.mex.resize(sizes.topheight - 80);
|
|
44
|
+
setTimeout(function() {
|
|
45
|
+
webEditor.canvas.helm.setSequence(value, 'HELM');
|
|
46
|
+
}, 200);
|
|
47
|
+
return {editorDiv: editorView, webEditor: webEditor};
|
|
43
48
|
}
|
|
44
49
|
}
|
|
45
50
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<html><head><meta charset="utf-8"/><title>Helm Test Report. Datagrok version datagrok/datagrok:latest SHA=
|
|
1
|
+
<html><head><meta charset="utf-8"/><title>Helm Test Report. Datagrok version datagrok/datagrok:latest SHA=5e15f45ca638. Commit 10548f95.</title><style type="text/css">html,
|
|
2
2
|
body {
|
|
3
3
|
font-family: Arial, Helvetica, sans-serif;
|
|
4
4
|
font-size: 1rem;
|
|
@@ -229,7 +229,7 @@ header {
|
|
|
229
229
|
font-size: 1rem;
|
|
230
230
|
padding: 0 0.5rem;
|
|
231
231
|
}
|
|
232
|
-
</style></head><body><div id="jesthtml-content"><header><h1 id="title">Helm Test Report. Datagrok version datagrok/datagrok:latest SHA=
|
|
232
|
+
</style></head><body><div id="jesthtml-content"><header><h1 id="title">Helm Test Report. Datagrok version datagrok/datagrok:latest SHA=5e15f45ca638. Commit 10548f95.</h1></header><div id="metadata-container"><div id="timestamp">Started: 2022-10-28 14:40:08</div><div id="summary"><div id="suite-summary"><div class="summary-total">Suites (1)</div><div class="summary-passed">1 passed</div><div class="summary-failed summary-empty">0 failed</div><div class="summary-pending summary-empty">0 pending</div></div><div id="test-summary"><div class="summary-total">Tests (1)</div><div class="summary-passed">1 passed</div><div class="summary-failed summary-empty">0 failed</div><div class="summary-pending summary-empty">0 pending</div></div></div></div><div id="suite-1" class="suite-container"><div class="suite-info"><div class="suite-path">/home/runner/work/public/public/packages/Helm/src/__jest__/remote.test.ts</div><div class="suite-time warn">14.009s</div></div><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename"> </div><div class="test-title">TEST</div><div class="test-status">passed</div><div class="test-duration">4.849s</div></div></div></div><div class="suite-consolelog"><div class="suite-consolelog-header">Console Log</div><div class="suite-consolelog-item"><pre class="suite-consolelog-item-origin"> at Object.<anonymous> (/home/runner/work/public/public/packages/Helm/src/__jest__/test-node.ts:61:11)
|
|
233
233
|
at Generator.next (<anonymous>)
|
|
234
234
|
at fulfilled (/home/runner/work/public/public/packages/Helm/src/__jest__/test-node.ts:28:58)
|
|
235
235
|
at processTicksAndRejections (internal/process/task_queues.js:97:5)</pre><pre class="suite-consolelog-item-message">Using web root: http://localhost:8080</pre></div><div class="suite-consolelog-item"><pre class="suite-consolelog-item-origin"> at /home/runner/work/public/public/packages/Helm/src/__jest__/remote.test.ts:40:11
|
|
@@ -242,7 +242,8 @@ header {
|
|
|
242
242
|
at new Promise (<anonymous>)</pre><pre class="suite-consolelog-item-message">Testing Helm package</pre></div><div class="suite-consolelog-item"><pre class="suite-consolelog-item-origin"> at /home/runner/work/public/public/packages/Helm/src/__jest__/remote.test.ts:66:11
|
|
243
243
|
at Generator.next (<anonymous>)
|
|
244
244
|
at fulfilled (/home/runner/work/public/public/packages/Helm/src/__jest__/remote.test.ts:31:58)
|
|
245
|
-
at
|
|
246
|
-
Test result : Success :
|
|
247
|
-
Test result : Success :
|
|
245
|
+
at runMicrotasks (<anonymous>)
|
|
246
|
+
at processTicksAndRejections (internal/process/task_queues.js:97:5)</pre><pre class="suite-consolelog-item-message">Test result : Success : 38 : Helm.Helm.manageFiles : OK
|
|
247
|
+
Test result : Success : 739 : Helm.Helm.monomerManager : OK
|
|
248
|
+
Test result : Success : 1 : Helm.Helm.parseHelm : OK
|
|
248
249
|
</pre></div></div></div></div></body></html>
|