mc-react-structure-visualizer 0.6.1 → 0.7.0

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.css CHANGED
@@ -1 +1 @@
1
- .control-box{position:relative;z-index:1;height:100px;width:450px;background:#fafafa;text-align:center;border:1px solid #999;display:flex;flex-direction:column;justify-content:center;align-items:start;margin-top:-20px;padding:30px 10px 10px;border-radius:5px}.supercell-container{display:flex;align-items:center;gap:2px}.supercell-input{width:45px;height:25px}.supercell-input::-webkit-inner-spin-button,.supercell-input::-webkit-outer-spin-button{opacity:1}.control-box-row{padding:4px 10px;width:100%;line-height:inherit;display:flex;justify-content:space-between;align-items:stretch}.form-label{margin-bottom:0rem}.form-control{padding:0rem .275rem}.camera-controls{margin-left:auto;margin-right:auto;display:inline-flex;align-items:center;justify-items:center;text-align:center;gap:2px}.camera-button{border-width:1px;border-color:#000;border-radius:4px;display:inline-flex;align-items:center;justify-items:center;color:#000;background-color:#e0e0e0;padding:8px;height:25px}.camera-button:hover{color:#000;background-color:#b9b9b9}.control-box-row .form-check-input{margin-left:0}.control-box-row .form-check-label{margin-left:4px}.control-box-row .form-check{margin:0;padding:0}.gldiv{width:98%;height:98%;position:relative}.structure-window-outer{position:relative}.structure-window{position:relative;z-index:2;height:370px;width:450px;background:#fff;text-align:center;border:1px solid #999;display:flex;justify-content:center;align-items:center;border-radius:5px}.disable-mouse{pointer-events:none}.mouse-disabled-note{background-color:#fff1f1;border:1px solid black;color:#353434;padding:2px 6px;border-radius:5px;position:absolute;top:10px;left:10px;z-index:3;cursor:pointer;-webkit-user-select:none;user-select:none}.on{background-color:#e9ffe7}.mouse-disabled-note:hover{filter:brightness(90%)}.structure-visualizer{width:450px;font-size:16px}
1
+ .control-box{position:relative;z-index:1;width:100%;background:#f8f8f8;text-align:center;border:1px solid #999;display:flex;flex-wrap:wrap;flex-direction:column;justify-content:center;align-items:start;border-radius:5px;margin-top:-5px;padding:15px 10px 10px}.supercell-container{display:flex;align-items:center;gap:2px}.supercell-input{width:45px;height:25px}.supercell-input::-webkit-inner-spin-button,.supercell-input::-webkit-outer-spin-button{opacity:1}.control-box-row{padding:4px;width:100%;line-height:inherit;display:flex;flex-wrap:wrap;justify-content:space-around;align-items:stretch}.form-label{margin-bottom:0rem}.form-control{padding:0rem .275rem}.camera-controls{display:inline-flex;align-items:center;justify-items:center;text-align:center;gap:2px}.camera-button{border-width:1px;border-color:#000;border-radius:4px;display:inline-flex;align-items:center;justify-items:center;color:#000;background-color:#e0e0e0;padding:8px;height:25px}.camera-button:hover{color:#000;background-color:#b9b9b9}.control-box-row .form-check-input{margin-left:0}.control-box-row .form-check-label{margin-left:4px}.control-box-row .form-check{margin:0;padding:0}.gldiv{width:98%;height:98%;position:relative}.structure-window-outer{position:relative;width:100%;flex:1;display:flex;align-items:stretch}.structure-window-click-handler{width:100%}.structure-window{position:relative;z-index:2;height:100%;width:100%;background:#fff;text-align:center;border:1px solid #999;display:flex;justify-content:center;align-items:center;border-radius:5px}.disable-mouse{pointer-events:none}.mouse-disabled-note{background-color:#f8f8f8;border:1px solid #999999;color:#353434;padding:1px 6px;border-radius:5px;position:absolute;bottom:10px;right:10px;z-index:3;cursor:pointer;-webkit-user-select:none;user-select:none}.on{display:none}.mouse-disabled-note:hover{filter:brightness(90%)}.structure-visualizer{width:100%;height:100%;min-height:250px;min-width:250px;font-size:16px;display:flex;flex-direction:column}
package/dist/main.js CHANGED
@@ -24503,16 +24503,23 @@ class StructureWindow extends React.Component {
24503
24503
  render() {
24504
24504
  let L = "structure-window";
24505
24505
  this.props.mouseEnabled || (L += " disable-mouse");
24506
- let f = "Interaction off", C = "mouse-disabled-note";
24507
- return this.props.mouseEnabled && (f = "Interaction on", C = "mouse-disabled-note on"), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "structure-window-outer", children: [
24508
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { onClick: () => this.props.setMouseEnabledState(!0), children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: L, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
24509
- Visualizer3dmol,
24506
+ let f = "Click to interact", C = "mouse-disabled-note";
24507
+ return this.props.mouseEnabled && (C = "mouse-disabled-note on"), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "structure-window-outer", children: [
24508
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
24509
+ "div",
24510
24510
  {
24511
- ref: this.props.visualizerRef,
24512
- viewerParams: this.props.viewerParams,
24513
- cifText: this.props.cifText
24511
+ className: "structure-window-click-handler",
24512
+ onClick: () => this.props.setMouseEnabledState(!0),
24513
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: L, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
24514
+ Visualizer3dmol,
24515
+ {
24516
+ ref: this.props.visualizerRef,
24517
+ viewerParams: this.props.viewerParams,
24518
+ cifText: this.props.cifText
24519
+ }
24520
+ ) })
24514
24521
  }
24515
- ) }) }),
24522
+ ),
24516
24523
  /* @__PURE__ */ jsxRuntimeExports.jsx(
24517
24524
  "div",
24518
24525
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mc-react-structure-visualizer",
3
- "version": "0.6.1",
3
+ "version": "0.7.0",
4
4
  "author": "Kristjan Eimre <kristjan.eimre@epfl.ch>",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",