@datagrok/helm 2.1.4 → 2.1.5
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/dist/package.js +12 -7
- package/package.json +1 -1
- package/src/package.ts +11 -6
package/package.json
CHANGED
package/src/package.ts
CHANGED
|
@@ -94,14 +94,15 @@ export function helmCellRenderer(): HelmCellRenderer {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
//tags: cellEditor
|
|
97
|
-
//description: Macromolecule
|
|
97
|
+
//description: Macromolecule
|
|
98
98
|
//input: grid_cell cell
|
|
99
99
|
export function editMoleculeCell(cell: DG.GridCell): void {
|
|
100
100
|
const monomers = findMonomers(cell.cell.value);
|
|
101
|
-
if (cell.gridColumn.column.tags[DG.TAGS.UNITS] === 'helm'
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
if (cell.gridColumn.column.tags[DG.TAGS.UNITS] === 'helm')
|
|
102
|
+
if (monomers.size == 0)
|
|
103
|
+
webEditor(cell);
|
|
104
|
+
else
|
|
105
|
+
grok.shell.warning(`Monomers ${Array.from(monomers).join(', ')} are absent!`);
|
|
105
106
|
}
|
|
106
107
|
|
|
107
108
|
//name: Open Helm Web Editor
|
|
@@ -112,7 +113,11 @@ export function openEditor(mol: string): void {
|
|
|
112
113
|
let df = grok.shell.tv.grid.dataFrame;
|
|
113
114
|
let converter = new NotationConverter(df.columns.bySemType('Macromolecule'));
|
|
114
115
|
const resStr = converter.convertStringToHelm(mol, '/');
|
|
115
|
-
|
|
116
|
+
const monomers = findMonomers(resStr);
|
|
117
|
+
if (monomers.size == 0)
|
|
118
|
+
webEditor(undefined, resStr);
|
|
119
|
+
else
|
|
120
|
+
grok.shell.warning(`Monomers ${Array.from(monomers).join(', ')} are absent!`);
|
|
116
121
|
}
|
|
117
122
|
|
|
118
123
|
//name: Properties
|