Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@datagrok-libraries/bio

Package Overview
Dependencies
Maintainers
0
Versions
266
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datagrok-libraries/bio - npm Package Compare versions

Comparing version 5.42.2 to 5.42.3

7

CHANGELOG.md
# bio changelog
## 5.42.3 (2024-06-26)
### Bug fixes
* GROK-15996: Fix cell renderer for long mode
* Fix package-lock.json
## 5.42.2 (2024-06-25)

@@ -4,0 +11,0 @@

2

package.json

@@ -11,3 +11,3 @@ {

"friendlyName": "Datagrok bio library",
"version": "5.42.2",
"version": "5.42.3",
"description": "Bio utilities, types supporting Macromolecule, Molecule3D data",

@@ -14,0 +14,0 @@ "dependencies": {

@@ -11,6 +11,6 @@ import * as DG from 'datagrok-api/dg';

monomerToShort: MonomerToShortFunc;
monomerLengthLimit: number;
};
export declare function hitBounds(bounds: number[], x: number): number | null;
export declare class MonomerPlacer extends CellRendererBackBase<string> {
monomerLengthLimit: number;
private readonly propsProvider;

@@ -23,4 +23,2 @@ private colWidth;

private _processedMaxVisibleSeqLength;
private _updated;
get updated(): boolean;
_monomerLengthMap: {

@@ -33,3 +31,3 @@ [key: string]: TextMetrics;

/** View is required to subscribe and handle for data frame changes */
constructor(gridCol: DG.GridColumn | null, tableCol: DG.Column<string>, logger: ILogger, propsProvider: () => MonomerPlacerProps);
constructor(gridCol: DG.GridColumn | null, tableCol: DG.Column<string>, logger: ILogger, monomerLengthLimit: number, propsProvider: () => MonomerPlacerProps);
protected reset(): void;

@@ -36,0 +34,0 @@ /** Returns monomers lengths of the {@link rowIdx} and cumulative sums for borders, monomer places */

@@ -27,6 +27,6 @@ import * as DG from 'datagrok-api/dg';

export class MonomerPlacer extends CellRendererBackBase {
get updated() { return this._updated; }
/** View is required to subscribe and handle for data frame changes */
constructor(gridCol, tableCol, logger, propsProvider) {
constructor(gridCol, tableCol, logger, monomerLengthLimit, propsProvider) {
super(gridCol, tableCol, logger);
this.monomerLengthLimit = monomerLengthLimit;
this.propsProvider = propsProvider;

@@ -38,3 +38,2 @@ this.colWidth = 0;

this._processedMaxVisibleSeqLength = 0;
this._updated = false;
this._monomerLengthMap = {}; // caches the lengths to save time on g.measureText

@@ -82,5 +81,6 @@ this._monomerStructureMap = {}; // caches the atomic structures of monomers

getCellMonomerLengthsForSeq(rowIdx) {
const logPrefix = `${this.toLog()}.getCellMonomerLengthsForSeqMsa()`;
// this.logger.debug(`${logPrefix}, start`);
if (this._monomerLengthList === null) {
this._monomerLengthList = new Array(this.tableCol.length).fill(null);
this._updated = true;
}

@@ -97,3 +97,3 @@ const minMonWidth = this.props.separatorWidth + 1 * this.props.monomerCharWidth;

const seqMonLabel = seqMonList[seqMonI];
const shortMon = this.props.monomerToShort(seqMonLabel, this.props.monomerLengthLimit);
const shortMon = this.props.monomerToShort(seqMonLabel, this.monomerLengthLimit);
const separatorWidth = this.props.seqHandler.isSeparator() ? this.separatorWidth : this.props.separatorWidth;

@@ -106,3 +106,2 @@ const seqMonWidth = separatorWidth + shortMon.length * this.props.monomerCharWidth;

}
this._updated = true;
}

@@ -113,5 +112,6 @@ return res;

var _a;
const logPrefix = `${this.toLog()}.getCellMonomerLengthsForSeqMsa()`;
// this.logger.debug(`${logPrefix}, start`);
if (this._monomerLengthList === null) {
this._monomerLengthList = new Array(1).fill(null);
this._updated = true;
}

@@ -151,3 +151,3 @@ (_a = this._monomerLengthList)[0] ?? (_a[0] = new Array(0));

const seqMonLabel = seqMonList[seqMonI];
const shortMon = this.props.monomerToShort(seqMonLabel, this.props.monomerLengthLimit);
const shortMon = this.props.monomerToShort(seqMonLabel, this.monomerLengthLimit);
const seqMonWidth = this.props.separatorWidth + shortMon.length * this.props.monomerCharWidth;

@@ -159,3 +159,2 @@ res[seqMonI] = Math.max(res[seqMonI] ?? 0, seqMonWidth);

}
this._updated = true;
this._processedMaxVisibleSeqLength = Math.max(this._processedMaxVisibleSeqLength, maxVisibleSeqLength);

@@ -175,8 +174,8 @@ }

setMonomerLengthLimit(limit) {
this.props.monomerLengthLimit = limit;
this._updated = true;
this.monomerLengthLimit = limit;
this.reset();
}
setSeparatorWidth(width) {
this.props.separatorWidth = width;
this._updated = true;
this.reset();
}

@@ -183,0 +182,0 @@ isMsa() {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc