ketcher-react 3.0.1 → 3.0.2
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/cjs/index.js +37 -18
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/{index.modern-5c6e050a.js → index.modern-8781ad41.js} +1 -1
- package/dist/cjs/{index.modern-5c6e050a.js.map → index.modern-8781ad41.js.map} +1 -1
- package/dist/index.js +37 -18
- package/dist/index.js.map +1 -1
- package/dist/{index.modern-d60b0a29.js → index.modern-38042a36.js} +1 -1
- package/dist/{index.modern-d60b0a29.js.map → index.modern-38042a36.js.map} +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3743,7 +3743,7 @@ var zoom = {
|
|
|
3743
3743
|
|
|
3744
3744
|
var openHelpLink = function openHelpLink() {
|
|
3745
3745
|
var _window$open;
|
|
3746
|
-
return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v3.0.
|
|
3746
|
+
return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v3.0.2\n", "/documentation/help.md#ketcher-overview"))) === null || _window$open === void 0 ? void 0 : _window$open.focus();
|
|
3747
3747
|
};
|
|
3748
3748
|
var help = {
|
|
3749
3749
|
help: {
|
|
@@ -22967,13 +22967,32 @@ var RotateTool = function () {
|
|
|
22967
22967
|
key: "mouseup",
|
|
22968
22968
|
value:
|
|
22969
22969
|
function mouseup() {
|
|
22970
|
+
var _dragCtx$mergeItems,
|
|
22971
|
+
_this3 = this;
|
|
22970
22972
|
if (!this.dragCtx) {
|
|
22971
22973
|
return true;
|
|
22972
22974
|
}
|
|
22973
22975
|
this.reStruct.clearSnappingBonds();
|
|
22974
22976
|
this.editor.update(true);
|
|
22975
22977
|
var dragCtx = this.dragCtx;
|
|
22976
|
-
var
|
|
22978
|
+
var isMergingSGroup = false;
|
|
22979
|
+
var _ref = (_dragCtx$mergeItems = dragCtx.mergeItems) !== null && _dragCtx$mergeItems !== void 0 ? _dragCtx$mergeItems : {},
|
|
22980
|
+
atoms = _ref.atoms,
|
|
22981
|
+
bonds = _ref.bonds;
|
|
22982
|
+
atoms === null || atoms === void 0 || atoms.forEach(function (dst, src) {
|
|
22983
|
+
if (_this3.struct.isAtomFromMacromolecule(src) || _this3.struct.isAtomFromMacromolecule(dst)) {
|
|
22984
|
+
isMergingSGroup = true;
|
|
22985
|
+
}
|
|
22986
|
+
});
|
|
22987
|
+
bonds === null || bonds === void 0 || bonds.forEach(function (dst, src) {
|
|
22988
|
+
if (_this3.struct.isBondFromMacromolecule(src) || _this3.struct.isBondFromMacromolecule(dst)) {
|
|
22989
|
+
isMergingSGroup = true;
|
|
22990
|
+
}
|
|
22991
|
+
});
|
|
22992
|
+
var action = dragCtx.action;
|
|
22993
|
+
if (!isMergingSGroup) {
|
|
22994
|
+
action = action ? fromItemsFuse(this.reStruct, dragCtx.mergeItems).mergeWith(action) : fromItemsFuse(this.reStruct, dragCtx.mergeItems);
|
|
22995
|
+
}
|
|
22977
22996
|
delete this.dragCtx;
|
|
22978
22997
|
this.editor.update(action);
|
|
22979
22998
|
if (dragCtx.mergeItems) {
|
|
@@ -23088,18 +23107,18 @@ var RotateTool = function () {
|
|
|
23088
23107
|
}, {
|
|
23089
23108
|
key: "partitionNeighborsBySelection",
|
|
23090
23109
|
value: function partitionNeighborsBySelection(selection, atom) {
|
|
23091
|
-
var
|
|
23110
|
+
var _this4 = this;
|
|
23092
23111
|
var rotatableHalfBondIds = [];
|
|
23093
23112
|
var rotatableHalfBondAngles = [];
|
|
23094
23113
|
var fixedHalfBondIds = [];
|
|
23095
23114
|
var fixedHalfBondAngles = [];
|
|
23096
23115
|
atom.neighbors.forEach(function (halfBondId) {
|
|
23097
23116
|
var _selection$atoms;
|
|
23098
|
-
var halfBond =
|
|
23117
|
+
var halfBond = _this4.struct.halfBonds.get(halfBondId);
|
|
23099
23118
|
assert_1(halfBond != null);
|
|
23100
23119
|
var neighborAtomId = halfBond.end;
|
|
23101
23120
|
if (selection !== null && selection !== void 0 && (_selection$atoms = selection.atoms) !== null && _selection$atoms !== void 0 && _selection$atoms.includes(neighborAtomId)) {
|
|
23102
|
-
if (!FunctionalGroup.isHalfBondInContractedFunctionalGroup(halfBond,
|
|
23121
|
+
if (!FunctionalGroup.isHalfBondInContractedFunctionalGroup(halfBond, _this4.struct)) {
|
|
23103
23122
|
rotatableHalfBondIds.push(halfBondId);
|
|
23104
23123
|
rotatableHalfBondAngles.push(halfBond.ang);
|
|
23105
23124
|
}
|
|
@@ -23118,7 +23137,7 @@ var RotateTool = function () {
|
|
|
23118
23137
|
}, {
|
|
23119
23138
|
key: "snap",
|
|
23120
23139
|
value: function snap(mouseMoveAngle) {
|
|
23121
|
-
var
|
|
23140
|
+
var _this5 = this;
|
|
23122
23141
|
var isSnapping = false;
|
|
23123
23142
|
var rotateAngle = 0;
|
|
23124
23143
|
if (!this.snapInfo) {
|
|
@@ -23128,18 +23147,18 @@ var RotateTool = function () {
|
|
|
23128
23147
|
this.snapInfo.absoluteSnapAngles.some(function (snapAngle, index) {
|
|
23129
23148
|
if (Math.abs(newRotatedHalfBondAngle - snapAngle) <= MAX_SNAP_DELTA) {
|
|
23130
23149
|
isSnapping = true;
|
|
23131
|
-
assert_1(
|
|
23132
|
-
rotateAngle = snapAngle -
|
|
23133
|
-
|
|
23134
|
-
|
|
23150
|
+
assert_1(_this5.snapInfo != null);
|
|
23151
|
+
rotateAngle = snapAngle - _this5.snapInfo.rotatableHalfBondAngle;
|
|
23152
|
+
_this5.saveSnappingBonds(snapAngle);
|
|
23153
|
+
_this5.snapInfo.snapAngleDrawingProps = {
|
|
23135
23154
|
isSnapping: isSnapping,
|
|
23136
23155
|
absoluteAngle: snapAngle,
|
|
23137
23156
|
relativeAngle: SNAP_ANGLES_RELATIVE_TO_FIXED_BOND[index]
|
|
23138
23157
|
};
|
|
23139
23158
|
return true;
|
|
23140
23159
|
} else if (Math.abs(newRotatedHalfBondAngle - snapAngle) < ANGLE_INDICATOR_VISIBLE_DELTA) {
|
|
23141
|
-
assert_1(
|
|
23142
|
-
|
|
23160
|
+
assert_1(_this5.snapInfo != null);
|
|
23161
|
+
_this5.snapInfo.snapAngleDrawingProps = {
|
|
23143
23162
|
isSnapping: isSnapping,
|
|
23144
23163
|
absoluteAngle: snapAngle,
|
|
23145
23164
|
relativeAngle: SNAP_ANGLES_RELATIVE_TO_FIXED_BOND[index]
|
|
@@ -23154,15 +23173,15 @@ var RotateTool = function () {
|
|
|
23154
23173
|
key: "saveSnappingBonds",
|
|
23155
23174
|
value: function saveSnappingBonds(snapAngle) {
|
|
23156
23175
|
var _this$snapInfo2,
|
|
23157
|
-
|
|
23176
|
+
_this6 = this;
|
|
23158
23177
|
var halfBondsToBeHighlighted = (_this$snapInfo2 = this.snapInfo) === null || _this$snapInfo2 === void 0 ? void 0 : _this$snapInfo2.snapAngleToHalfBonds.get(snapAngle);
|
|
23159
23178
|
var bondIds = halfBondsToBeHighlighted === null || halfBondsToBeHighlighted === void 0 ? void 0 : halfBondsToBeHighlighted.map(function (halfBond) {
|
|
23160
|
-
var bondId =
|
|
23179
|
+
var bondId = _this6.struct.getBondIdByHalfBond(halfBond);
|
|
23161
23180
|
assert_1(bondId != null);
|
|
23162
23181
|
return bondId;
|
|
23163
23182
|
});
|
|
23164
23183
|
bondIds === null || bondIds === void 0 || bondIds.forEach(function (bondId) {
|
|
23165
|
-
|
|
23184
|
+
_this6.reStruct.addSnappingBonds(bondId);
|
|
23166
23185
|
});
|
|
23167
23186
|
}
|
|
23168
23187
|
}]);
|
|
@@ -34960,8 +34979,8 @@ var KetcherBuilder = function () {
|
|
|
34960
34979
|
cleanup = initApp(element, appRoot, staticResourcesUrl, {
|
|
34961
34980
|
buttons: buttons || {},
|
|
34962
34981
|
errorHandler: errorHandler || null,
|
|
34963
|
-
version: "3.0.
|
|
34964
|
-
buildDate: "2025-02-
|
|
34982
|
+
version: "3.0.2" ,
|
|
34983
|
+
buildDate: "2025-02-25T23:12:22" ,
|
|
34965
34984
|
buildNumber: '',
|
|
34966
34985
|
customButtons: customButtons || []
|
|
34967
34986
|
}, structService, resolve, togglerComponent);
|
|
@@ -35253,7 +35272,7 @@ var ModeControl = function ModeControl(_ref3) {
|
|
|
35253
35272
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
35254
35273
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
35255
35274
|
var MacromoleculesEditor = lazy(function () {
|
|
35256
|
-
return import('./index.modern-
|
|
35275
|
+
return import('./index.modern-38042a36.js');
|
|
35257
35276
|
});
|
|
35258
35277
|
var Editor = function Editor(props) {
|
|
35259
35278
|
var _useState = useState(false),
|