ketcher-react 2.11.0-rc.2 → 2.11.0-rc.4

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/index.js CHANGED
@@ -3071,7 +3071,7 @@ var zoom = {
3071
3071
 
3072
3072
  var openHelpLink = function openHelpLink() {
3073
3073
  var _window$open;
3074
- return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v2.11.0-rc.2\n", "/documentation/help.md#ketcher-overview"))) === null || _window$open === void 0 ? void 0 : _window$open.focus();
3074
+ return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v2.11.0-rc.4\n", "/documentation/help.md#ketcher-overview"))) === null || _window$open === void 0 ? void 0 : _window$open.focus();
3075
3075
  };
3076
3076
  var help = {
3077
3077
  help: {
@@ -7590,6 +7590,7 @@ var RenderStruct = function () {
7590
7590
  var rnd = new ketcherCore.Render(el, _objectSpread$11({
7591
7591
  autoScale: true
7592
7592
  }, options));
7593
+ preparedStruct.rescale();
7593
7594
  rnd.setMolecule(preparedStruct);
7594
7595
  if (needCache) {
7595
7596
  renderCache.set(cacheKey, rnd.clientArea.innerHTML);
@@ -18051,7 +18052,7 @@ var InfoPanel = function InfoPanel(props) {
18051
18052
  var childRef = React.useRef(null);
18052
18053
  var groupName = sGroup === null || sGroup === void 0 ? void 0 : (_sGroup$data = sGroup.data) === null || _sGroup$data === void 0 ? void 0 : _sGroup$data.name;
18053
18054
  React.useEffect(function () {
18054
- if (!groupStruct && (sGroup === null || sGroup === void 0 ? void 0 : sGroup.type) === 'DAT') {
18055
+ if (sGroup && ketcherCore.SGroup.isDataSGroup(sGroup)) {
18055
18056
  var _sGroup$data2, _sGroup$data3;
18056
18057
  setSGroupData("".concat((_sGroup$data2 = sGroup.data) === null || _sGroup$data2 === void 0 ? void 0 : _sGroup$data2.fieldName, "=").concat((_sGroup$data3 = sGroup.data) === null || _sGroup$data3 === void 0 ? void 0 : _sGroup$data3.fieldValue));
18057
18058
  } else {
@@ -18061,7 +18062,8 @@ var InfoPanel = function InfoPanel(props) {
18061
18062
  React.useEffect(function () {
18062
18063
  setMolecule(groupStruct ? groupStruct.clone() : null);
18063
18064
  }, [groupName, groupStruct]);
18064
- if (!molecule && !sGroupData || clientX === undefined || clientY === undefined) {
18065
+ var nonTooltipSGroup = !sGroup || ketcherCore.SGroup.isMulSGroup(sGroup) || ketcherCore.SGroup.isSRUSGroup(sGroup);
18066
+ if (nonTooltipSGroup || !molecule && !sGroupData || clientX === undefined || clientY === undefined) {
18065
18067
  return null;
18066
18068
  }
18067
18069
  var _getPanelPosition = getPanelPosition(clientX, clientY, render, sGroup),
@@ -18072,7 +18074,8 @@ var InfoPanel = function InfoPanel(props) {
18072
18074
  y = position.y;
18073
18075
  var width = size.x;
18074
18076
  var height = size.y;
18075
- return molecule ? jsxRuntime.jsx("div", {
18077
+ var showMolecule = molecule && sGroup && !ketcherCore.SGroup.isDataSGroup(sGroup);
18078
+ return showMolecule ? jsxRuntime.jsx("div", {
18076
18079
  style: {
18077
18080
  left: x + 'px',
18078
18081
  top: y + 'px'
@@ -24667,8 +24670,8 @@ var KetcherBuilder = function () {
24667
24670
  initApp(element, staticResourcesUrl, {
24668
24671
  buttons: buttons || {},
24669
24672
  errorHandler: errorHandler || null,
24670
- version: "2.11.0-rc.2" ,
24671
- buildDate: "2023-05-30T13:30:11" ,
24673
+ version: "2.11.0-rc.4" ,
24674
+ buildDate: "2023-06-01T12:49:40" ,
24672
24675
  buildNumber: ''
24673
24676
  }, structService, resolve);
24674
24677
  });