ketcher-react 3.1.0-rc.4 → 3.1.0-rc.6
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-ecb6a213.js → index.modern-1cbc2dff.js} +1 -1
- package/dist/cjs/{index.modern-ecb6a213.js.map → index.modern-1cbc2dff.js.map} +1 -1
- package/dist/index.js +37 -18
- package/dist/index.js.map +1 -1
- package/dist/{index.modern-3f50df61.js → index.modern-1eba1f75.js} +1 -1
- package/dist/{index.modern-3f50df61.js.map → index.modern-1eba1f75.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.1.0-rc.
|
|
3746
|
+
return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v3.1.0-rc.6\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: {
|
|
@@ -22971,13 +22971,32 @@ var RotateTool = function () {
|
|
|
22971
22971
|
key: "mouseup",
|
|
22972
22972
|
value:
|
|
22973
22973
|
function mouseup() {
|
|
22974
|
+
var _dragCtx$mergeItems,
|
|
22975
|
+
_this3 = this;
|
|
22974
22976
|
if (!this.dragCtx) {
|
|
22975
22977
|
return true;
|
|
22976
22978
|
}
|
|
22977
22979
|
this.reStruct.clearSnappingBonds();
|
|
22978
22980
|
this.editor.update(true);
|
|
22979
22981
|
var dragCtx = this.dragCtx;
|
|
22980
|
-
var
|
|
22982
|
+
var isMergingSGroup = false;
|
|
22983
|
+
var _ref = (_dragCtx$mergeItems = dragCtx.mergeItems) !== null && _dragCtx$mergeItems !== void 0 ? _dragCtx$mergeItems : {},
|
|
22984
|
+
atoms = _ref.atoms,
|
|
22985
|
+
bonds = _ref.bonds;
|
|
22986
|
+
atoms === null || atoms === void 0 || atoms.forEach(function (dst, src) {
|
|
22987
|
+
if (_this3.struct.isAtomFromMacromolecule(src) || _this3.struct.isAtomFromMacromolecule(dst)) {
|
|
22988
|
+
isMergingSGroup = true;
|
|
22989
|
+
}
|
|
22990
|
+
});
|
|
22991
|
+
bonds === null || bonds === void 0 || bonds.forEach(function (dst, src) {
|
|
22992
|
+
if (_this3.struct.isBondFromMacromolecule(src) || _this3.struct.isBondFromMacromolecule(dst)) {
|
|
22993
|
+
isMergingSGroup = true;
|
|
22994
|
+
}
|
|
22995
|
+
});
|
|
22996
|
+
var action = dragCtx.action;
|
|
22997
|
+
if (!isMergingSGroup) {
|
|
22998
|
+
action = action ? fromItemsFuse(this.reStruct, dragCtx.mergeItems).mergeWith(action) : fromItemsFuse(this.reStruct, dragCtx.mergeItems);
|
|
22999
|
+
}
|
|
22981
23000
|
delete this.dragCtx;
|
|
22982
23001
|
this.editor.update(action);
|
|
22983
23002
|
if (dragCtx.mergeItems) {
|
|
@@ -23092,18 +23111,18 @@ var RotateTool = function () {
|
|
|
23092
23111
|
}, {
|
|
23093
23112
|
key: "partitionNeighborsBySelection",
|
|
23094
23113
|
value: function partitionNeighborsBySelection(selection, atom) {
|
|
23095
|
-
var
|
|
23114
|
+
var _this4 = this;
|
|
23096
23115
|
var rotatableHalfBondIds = [];
|
|
23097
23116
|
var rotatableHalfBondAngles = [];
|
|
23098
23117
|
var fixedHalfBondIds = [];
|
|
23099
23118
|
var fixedHalfBondAngles = [];
|
|
23100
23119
|
atom.neighbors.forEach(function (halfBondId) {
|
|
23101
23120
|
var _selection$atoms;
|
|
23102
|
-
var halfBond =
|
|
23121
|
+
var halfBond = _this4.struct.halfBonds.get(halfBondId);
|
|
23103
23122
|
assert_1(halfBond != null);
|
|
23104
23123
|
var neighborAtomId = halfBond.end;
|
|
23105
23124
|
if (selection !== null && selection !== void 0 && (_selection$atoms = selection.atoms) !== null && _selection$atoms !== void 0 && _selection$atoms.includes(neighborAtomId)) {
|
|
23106
|
-
if (!FunctionalGroup.isHalfBondInContractedFunctionalGroup(halfBond,
|
|
23125
|
+
if (!FunctionalGroup.isHalfBondInContractedFunctionalGroup(halfBond, _this4.struct)) {
|
|
23107
23126
|
rotatableHalfBondIds.push(halfBondId);
|
|
23108
23127
|
rotatableHalfBondAngles.push(halfBond.ang);
|
|
23109
23128
|
}
|
|
@@ -23122,7 +23141,7 @@ var RotateTool = function () {
|
|
|
23122
23141
|
}, {
|
|
23123
23142
|
key: "snap",
|
|
23124
23143
|
value: function snap(mouseMoveAngle) {
|
|
23125
|
-
var
|
|
23144
|
+
var _this5 = this;
|
|
23126
23145
|
var isSnapping = false;
|
|
23127
23146
|
var rotateAngle = 0;
|
|
23128
23147
|
if (!this.snapInfo) {
|
|
@@ -23132,18 +23151,18 @@ var RotateTool = function () {
|
|
|
23132
23151
|
this.snapInfo.absoluteSnapAngles.some(function (snapAngle, index) {
|
|
23133
23152
|
if (Math.abs(newRotatedHalfBondAngle - snapAngle) <= MAX_SNAP_DELTA) {
|
|
23134
23153
|
isSnapping = true;
|
|
23135
|
-
assert_1(
|
|
23136
|
-
rotateAngle = snapAngle -
|
|
23137
|
-
|
|
23138
|
-
|
|
23154
|
+
assert_1(_this5.snapInfo != null);
|
|
23155
|
+
rotateAngle = snapAngle - _this5.snapInfo.rotatableHalfBondAngle;
|
|
23156
|
+
_this5.saveSnappingBonds(snapAngle);
|
|
23157
|
+
_this5.snapInfo.snapAngleDrawingProps = {
|
|
23139
23158
|
isSnapping: isSnapping,
|
|
23140
23159
|
absoluteAngle: snapAngle,
|
|
23141
23160
|
relativeAngle: SNAP_ANGLES_RELATIVE_TO_FIXED_BOND[index]
|
|
23142
23161
|
};
|
|
23143
23162
|
return true;
|
|
23144
23163
|
} else if (Math.abs(newRotatedHalfBondAngle - snapAngle) < ANGLE_INDICATOR_VISIBLE_DELTA) {
|
|
23145
|
-
assert_1(
|
|
23146
|
-
|
|
23164
|
+
assert_1(_this5.snapInfo != null);
|
|
23165
|
+
_this5.snapInfo.snapAngleDrawingProps = {
|
|
23147
23166
|
isSnapping: isSnapping,
|
|
23148
23167
|
absoluteAngle: snapAngle,
|
|
23149
23168
|
relativeAngle: SNAP_ANGLES_RELATIVE_TO_FIXED_BOND[index]
|
|
@@ -23158,15 +23177,15 @@ var RotateTool = function () {
|
|
|
23158
23177
|
key: "saveSnappingBonds",
|
|
23159
23178
|
value: function saveSnappingBonds(snapAngle) {
|
|
23160
23179
|
var _this$snapInfo2,
|
|
23161
|
-
|
|
23180
|
+
_this6 = this;
|
|
23162
23181
|
var halfBondsToBeHighlighted = (_this$snapInfo2 = this.snapInfo) === null || _this$snapInfo2 === void 0 ? void 0 : _this$snapInfo2.snapAngleToHalfBonds.get(snapAngle);
|
|
23163
23182
|
var bondIds = halfBondsToBeHighlighted === null || halfBondsToBeHighlighted === void 0 ? void 0 : halfBondsToBeHighlighted.map(function (halfBond) {
|
|
23164
|
-
var bondId =
|
|
23183
|
+
var bondId = _this6.struct.getBondIdByHalfBond(halfBond);
|
|
23165
23184
|
assert_1(bondId != null);
|
|
23166
23185
|
return bondId;
|
|
23167
23186
|
});
|
|
23168
23187
|
bondIds === null || bondIds === void 0 || bondIds.forEach(function (bondId) {
|
|
23169
|
-
|
|
23188
|
+
_this6.reStruct.addSnappingBonds(bondId);
|
|
23170
23189
|
});
|
|
23171
23190
|
}
|
|
23172
23191
|
}]);
|
|
@@ -35000,8 +35019,8 @@ var KetcherBuilder = function () {
|
|
|
35000
35019
|
cleanup = initApp(element, appRoot, staticResourcesUrl, {
|
|
35001
35020
|
buttons: buttons || {},
|
|
35002
35021
|
errorHandler: errorHandler || null,
|
|
35003
|
-
version: "3.1.0-rc.
|
|
35004
|
-
buildDate: "2025-02-
|
|
35022
|
+
version: "3.1.0-rc.6" ,
|
|
35023
|
+
buildDate: "2025-02-26T20:07:36" ,
|
|
35005
35024
|
buildNumber: '',
|
|
35006
35025
|
customButtons: customButtons || []
|
|
35007
35026
|
}, structService, resolve, togglerComponent);
|
|
@@ -35293,7 +35312,7 @@ var ModeControl = function ModeControl(_ref3) {
|
|
|
35293
35312
|
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; }
|
|
35294
35313
|
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; }
|
|
35295
35314
|
var MacromoleculesEditor = lazy(function () {
|
|
35296
|
-
return import('./index.modern-
|
|
35315
|
+
return import('./index.modern-1eba1f75.js');
|
|
35297
35316
|
});
|
|
35298
35317
|
var Editor = function Editor(props) {
|
|
35299
35318
|
var _useState = useState(false),
|