diff --git a/CHANGELOG.md b/CHANGELOG.md index fb197b561692c51e992a5db220ab32a75390f9d1..c9cbed82a0c88e0e0bdc06e045ca3c46f55628e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,14 @@ Note that since we don't clearly distinguish between a public and private interf ## [Unreleased] -- Fix missing ``super.componentWillUnmount()`` calls (@simeonborko) - Add support for Glycam saccharide names +## [v3.9.1] - 2022-06-19 + +- Fix missing ``super.componentWillUnmount()`` calls (@simeonborko) +- Fix missing ``uGroupCount`` update for visuals +- Fix missing aromatic bond display + ## [v3.9.0] - 2022-05-30 - Improve picking by using drawbuffers (when available) to reduce number of drawcalls diff --git a/package-lock.json b/package-lock.json index 70d6a914c46d23eb7a636d5764e06eb628c91ac9..ebd04c44d0c87794983dc11511ccf5262b833d4f 100644 Binary files a/package-lock.json and b/package-lock.json differ diff --git a/package.json b/package.json index 5cd468df8921aed97c1facb2eed2ef49d20e84fb..f287a08c01ebc4746eb437be117e66512235fe80 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "molstar", - "version": "3.9.0", + "version": "3.9.1", "description": "A comprehensive macromolecular library.", "homepage": "https://github.com/molstar/molstar#readme", "repository": { @@ -94,51 +94,51 @@ "@graphql-codegen/add": "^3.1.1", "@graphql-codegen/cli": "^2.6.2", "@graphql-codegen/time": "^3.1.1", - "@graphql-codegen/typescript": "^2.4.11", + "@graphql-codegen/typescript": "^2.5.1", "@graphql-codegen/typescript-graphql-files-modules": "^2.1.1", - "@graphql-codegen/typescript-graphql-request": "^4.4.8", - "@graphql-codegen/typescript-operations": "^2.4.0", + "@graphql-codegen/typescript-graphql-request": "^4.4.10", + "@graphql-codegen/typescript-operations": "^2.4.2", "@types/cors": "^2.8.12", "@types/gl": "^4.1.0", - "@types/jest": "^27.5.1", - "@types/react": "^18.0.9", + "@types/jest": "^28.1.2", + "@types/react": "^18.0.14", "@types/react-dom": "^18.0.5", - "@typescript-eslint/eslint-plugin": "^5.27.0", - "@typescript-eslint/parser": "^5.27.0", + "@typescript-eslint/eslint-plugin": "^5.28.0", + "@typescript-eslint/parser": "^5.28.0", "benchmark": "^2.1.4", - "concurrently": "^7.2.1", + "concurrently": "^7.2.2", "cpx2": "^4.2.0", "crypto-browserify": "^3.12.0", "css-loader": "^6.7.1", - "eslint": "^8.16.0", + "eslint": "^8.18.0", "extra-watch-webpack-plugin": "^1.0.3", "file-loader": "^6.2.0", "fs-extra": "^10.1.0", "graphql": "^16.5.0", - "http-server": "^14.1.0", - "jest": "^28.1.0", - "mini-css-extract-plugin": "^2.6.0", + "http-server": "^14.1.1", + "jest": "^28.1.1", + "mini-css-extract-plugin": "^2.6.1", "path-browserify": "^1.0.1", "raw-loader": "^4.0.2", - "react": "^18.1.0", - "react-dom": "^18.1.0", - "sass": "^1.52.1", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "sass": "^1.52.3", "sass-loader": "^13.0.0", - "simple-git": "^3.7.1", + "simple-git": "^3.8.0", "stream-browserify": "^3.0.0", "style-loader": "^3.3.1", - "ts-jest": "^28.0.3", - "typescript": "^4.7.2", - "webpack": "^5.72.1", - "webpack-cli": "^4.9.2" + "ts-jest": "^28.0.5", + "typescript": "^4.7.4", + "webpack": "^5.73.0", + "webpack-cli": "^4.10.0" }, "dependencies": { "@types/argparse": "^2.0.10", "@types/benchmark": "^2.1.1", "@types/compression": "1.7.2", "@types/express": "^4.17.13", - "@types/node": "^16.11.36", - "@types/node-fetch": "^2.6.1", + "@types/node": "^16.11.41", + "@types/node-fetch": "^2.6.2", "@types/swagger-ui-dist": "3.30.1", "argparse": "^2.0.1", "body-parser": "^1.20.0", @@ -146,11 +146,11 @@ "cors": "^2.8.5", "express": "^4.18.1", "h264-mp4-encoder": "^1.0.12", - "immer": "^9.0.14", + "immer": "^9.0.15", "immutable": "^4.1.0", "node-fetch": "^2.6.7", "rxjs": "^7.5.5", - "swagger-ui-dist": "^4.11.1", + "swagger-ui-dist": "^4.12.0", "tslib": "^2.4.0", "util.promisify": "^1.1.1", "xhr2": "^0.2.1" diff --git a/src/apps/viewer/app.ts b/src/apps/viewer/app.ts index 8896b1e02026a53ee221835d2c8ff99b2029cf3a..cee2646c35f3239230979bb3e6ff1686b327c285 100644 --- a/src/apps/viewer/app.ts +++ b/src/apps/viewer/app.ts @@ -400,7 +400,7 @@ export class Viewer { async loadTrajectory(params: LoadTrajectoryParams) { const plugin = this.plugin; - let model: StateObjectSelector, coords: StateObjectSelector; + let model: StateObjectSelector; if (params.model.kind === 'model-data' || params.model.kind === 'model-url') { const data = params.model.kind === 'model-data' @@ -418,14 +418,12 @@ export class Viewer { model = await provider!.parse(plugin, data); } - { - const data = params.coordinates.kind === 'coordinates-data' - ? await plugin.builders.data.rawData({ data: params.coordinates.data, label: params.coordinatesLabel }) - : await plugin.builders.data.download({ url: params.coordinates.url, isBinary: params.coordinates.isBinary, label: params.coordinatesLabel }); + const data = params.coordinates.kind === 'coordinates-data' + ? await plugin.builders.data.rawData({ data: params.coordinates.data, label: params.coordinatesLabel }) + : await plugin.builders.data.download({ url: params.coordinates.url, isBinary: params.coordinates.isBinary, label: params.coordinatesLabel }); - const provider = plugin.dataFormats.get(params.coordinates.format); - coords = await provider!.parse(plugin, data); - } + const provider = plugin.dataFormats.get(params.coordinates.format); + const coords = await provider!.parse(plugin, data); const trajectory = await plugin.build().toRoot() .apply(TrajectoryFromModelAndCoordinates, { diff --git a/src/mol-repr/shape/representation.ts b/src/mol-repr/shape/representation.ts index 70dc3d05aa347981c21827428fb93f1c77921b71..8571dc7353e2c74e326c338c708548133a2d3278 100644 --- a/src/mol-repr/shape/representation.ts +++ b/src/mol-repr/shape/representation.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2020 mol* contributors, licensed under MIT, See LICENSE file for more info. + * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose <alexander.rose@weirdbyte.de> */ @@ -132,6 +132,7 @@ export function ShapeRepresentation<D, G extends Geometry, P extends Geometry.Pa // console.log('update geometry') ValueCell.updateIfChanged(_renderObject.values.drawCount, Geometry.getDrawCount(_shape.geometry)); ValueCell.updateIfChanged(_renderObject.values.uVertexCount, Geometry.getVertexCount(_shape.geometry)); + ValueCell.updateIfChanged(_renderObject.values.uGroupCount, Geometry.getGroupCount(_shape.geometry)); } if (updateState.updateTransform || updateState.createGeometry) { diff --git a/src/mol-repr/structure/complex-visual.ts b/src/mol-repr/structure/complex-visual.ts index 54a7378334d0ba087333dc1028afa8db357fe0af..e1b13148d48555b8d5bf670e40839783d80952d4 100644 --- a/src/mol-repr/structure/complex-visual.ts +++ b/src/mol-repr/structure/complex-visual.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info. + * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose <alexander.rose@weirdbyte.de> */ @@ -161,6 +161,7 @@ export function ComplexVisual<G extends Geometry, P extends StructureParams & Ge if (newGeometry) { ValueCell.updateIfChanged(renderObject.values.drawCount, Geometry.getDrawCount(newGeometry)); ValueCell.updateIfChanged(renderObject.values.uVertexCount, Geometry.getVertexCount(newGeometry)); + ValueCell.updateIfChanged(renderObject.values.uGroupCount, Geometry.getGroupCount(newGeometry)); } else { throw new Error('expected geometry to be given'); } diff --git a/src/mol-repr/structure/units-visual.ts b/src/mol-repr/structure/units-visual.ts index 760028920025c278aaa5eab6096920da05c5939e..2325d08b91d80ce263548634d5a19b31b1fcaafd 100644 --- a/src/mol-repr/structure/units-visual.ts +++ b/src/mol-repr/structure/units-visual.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2020 mol* contributors, licensed under MIT, See LICENSE file for more info. + * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose <alexander.rose@weirdbyte.de> */ @@ -207,6 +207,7 @@ export function UnitsVisual<G extends Geometry, P extends StructureParams & Geom if (newGeometry) { ValueCell.updateIfChanged(renderObject.values.drawCount, Geometry.getDrawCount(newGeometry)); ValueCell.updateIfChanged(renderObject.values.uVertexCount, Geometry.getVertexCount(newGeometry)); + ValueCell.updateIfChanged(renderObject.values.uGroupCount, Geometry.getGroupCount(newGeometry)); } else { throw new Error('expected geometry to be given'); } diff --git a/src/mol-repr/structure/visual/bond-intra-unit-cylinder.ts b/src/mol-repr/structure/visual/bond-intra-unit-cylinder.ts index 013a584e157d160cba46adebd435061e99a503e3..ec837f48eebd89e02b9fbcf1af3095eb6785560e 100644 --- a/src/mol-repr/structure/visual/bond-intra-unit-cylinder.ts +++ b/src/mol-repr/structure/visual/bond-intra-unit-cylinder.ts @@ -149,10 +149,8 @@ function getIntraUnitBondCylinderBuilderProps(unit: Unit.Atomic, structure: Stru if (isBondType(f, BondType.Flag.Aromatic) || (arCount && !ignoreComputedAromatic)) { if (arCount === 2) { return LinkStyle.MirroredAromatic; - } else if (arCount === 1 || deloTriplets?.getThirdElement(aI, bI)) { - return LinkStyle.Aromatic; } else { - // case for bonds between two aromatic rings + return LinkStyle.Aromatic; } } } diff --git a/src/mol-repr/structure/visual/bond-intra-unit-line.ts b/src/mol-repr/structure/visual/bond-intra-unit-line.ts index 351c190c300c50f2c68205bcaa521b8d35e42e51..68d1ca4f957cdaa27a37a280f6c41cc7823f9eeb 100644 --- a/src/mol-repr/structure/visual/bond-intra-unit-line.ts +++ b/src/mol-repr/structure/visual/bond-intra-unit-line.ts @@ -110,10 +110,8 @@ function createIntraUnitBondLines(ctx: VisualContext, unit: Unit, structure: Str if (isBondType(f, BondType.Flag.Aromatic) || (arCount && !ignoreComputedAromatic)) { if (arCount === 2) { return LinkStyle.MirroredAromatic; - } else if (arCount === 1 || deloTriplets?.getThirdElement(aI, bI)) { - return LinkStyle.Aromatic; } else { - // case for bonds between two aromatic rings + return LinkStyle.Aromatic; } } } diff --git a/src/mol-repr/volume/representation.ts b/src/mol-repr/volume/representation.ts index 55c8250f7579c44a8d5519a12d215bad13b22eb4..bb90f67659a04e2192ad3e5367eac3da97204eb0 100644 --- a/src/mol-repr/volume/representation.ts +++ b/src/mol-repr/volume/representation.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info. + * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose <alexander.rose@weirdbyte.de> */ @@ -130,6 +130,7 @@ export function VolumeVisual<G extends Geometry, P extends VolumeParams & Geomet if (newGeometry) { ValueCell.updateIfChanged(renderObject.values.drawCount, Geometry.getDrawCount(newGeometry)); ValueCell.updateIfChanged(renderObject.values.uVertexCount, Geometry.getVertexCount(newGeometry)); + ValueCell.updateIfChanged(renderObject.values.uGroupCount, Geometry.getGroupCount(newGeometry)); } else { throw new Error('expected geometry to be given'); }