kitchen-simulator 2.0.53 → 2.0.54

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.
@@ -10,7 +10,7 @@ import { isEmpty, updateViwer2D, centering2D } from "./helper";
10
10
  import exporter from "../catalog/utils/exporter";
11
11
  import { render2DItem, render3DItem, render3DApplianceItem, render3DLightingItem } from "../catalog/utils/item-loader";
12
12
  import { convert } from "./convert-units-lite";
13
- import { GeometryUtils } from "./export";
13
+ import { GeometryUtils, MathUtils } from "./export";
14
14
  import { returnReplaceableDeepSearchType } from "../components/viewer2d/utils";
15
15
  import { SVGLoader } from 'three/addons/loaders/SVGLoader';
16
16
  var PRECISION = 2;
@@ -778,8 +778,8 @@ function updateAttributeOfSelectedElement(element, attrPayload, state, layer, pr
778
778
  var xp = (lengthValue + halfWidthLength) * Math.cos(alpha) + x0;
779
779
  var yp = (lengthValue + halfWidthLength) * Math.sin(alpha) + y0;
780
780
  var offset = GeometryUtils.pointPositionOnLineSegment(x0, y0, x1, y1, xp, yp);
781
- /*
782
- if (x0 > x1) offset = 1 - offset;
781
+ /*
782
+ if (x0 > x1) offset = 1 - offset;
783
783
  */
784
784
  var endAt = MathUtils.toFixedFloat(lineLength - lineLength * offset - halfWidthLength, PRECISION);
785
785
  var offsetUnit = attributesFormData.getIn(['offsetB', '_unit']);
@@ -816,8 +816,8 @@ function updateAttributeOfSelectedElement(element, attrPayload, state, layer, pr
816
816
  var _xp = _x0 - (_lengthValue + _halfWidthLength) * Math.cos(_alpha);
817
817
  var _yp = _y2 - (_lengthValue + _halfWidthLength) * Math.sin(_alpha);
818
818
  var _offset = GeometryUtils.pointPositionOnLineSegment(_x9, _y, _x0, _y2, _xp, _yp);
819
- /*
820
- if (x0 > x1) offset = 1 - offset;
819
+ /*
820
+ if (x0 > x1) offset = 1 - offset;
821
821
  */
822
822
  var startAt = MathUtils.toFixedFloat(_lineLength * _offset - _halfWidthLength, PRECISION);
823
823
  var _offsetUnit = attributesFormData.getIn(['offsetA', '_unit']);
@@ -614,13 +614,13 @@ function initAttrData(element, layer, state) {
614
614
  return new _immutable.Map({
615
615
  offset: element.offset,
616
616
  offsetA: new _immutable.Map({
617
- length: MathUtils.toFixedFloat(x0 > x1 ? endAt : startAt, PRECISION),
618
- _length: MathUtils.toFixedFloat(_lengthA, PRECISION),
617
+ length: _export.MathUtils.toFixedFloat(x0 > x1 ? endAt : startAt, PRECISION),
618
+ _length: _export.MathUtils.toFixedFloat(_lengthA, PRECISION),
619
619
  _unit: _unitA
620
620
  }),
621
621
  offsetB: new _immutable.Map({
622
- length: MathUtils.toFixedFloat(x0 > x1 ? startAt : endAt, PRECISION),
623
- _length: MathUtils.toFixedFloat(_lengthB, PRECISION),
622
+ length: _export.MathUtils.toFixedFloat(x0 > x1 ? startAt : endAt, PRECISION),
623
+ _length: _export.MathUtils.toFixedFloat(_lengthB, PRECISION),
624
624
  _unit: _unitB
625
625
  })
626
626
  });
@@ -785,10 +785,10 @@ function updateAttributeOfSelectedElement(element, attrPayload, state, layer, pr
785
785
  var xp = (lengthValue + halfWidthLength) * Math.cos(alpha) + x0;
786
786
  var yp = (lengthValue + halfWidthLength) * Math.sin(alpha) + y0;
787
787
  var offset = _export.GeometryUtils.pointPositionOnLineSegment(x0, y0, x1, y1, xp, yp);
788
- /*
789
- if (x0 > x1) offset = 1 - offset;
788
+ /*
789
+ if (x0 > x1) offset = 1 - offset;
790
790
  */
791
- var endAt = MathUtils.toFixedFloat(lineLength - lineLength * offset - halfWidthLength, PRECISION);
791
+ var endAt = _export.MathUtils.toFixedFloat(lineLength - lineLength * offset - halfWidthLength, PRECISION);
792
792
  var offsetUnit = attributesFormData.getIn(['offsetB', '_unit']);
793
793
  var offsetB = new _immutable.Map({
794
794
  length: endAt,
@@ -797,9 +797,9 @@ function updateAttributeOfSelectedElement(element, attrPayload, state, layer, pr
797
797
  });
798
798
  attributesFormData = attributesFormData.set('offsetB', offsetB).set('offset', offset);
799
799
  var offsetAttribute = new _immutable.Map({
800
- length: MathUtils.toFixedFloat(lengthValue, PRECISION),
800
+ length: _export.MathUtils.toFixedFloat(lengthValue, PRECISION),
801
801
  _unit: value.get('_unit'),
802
- _length: MathUtils.toFixedFloat((0, _convertUnitsLite.convert)(lengthValue).from(_constants.UNIT_CENTIMETER).to(value.get('_unit')), PRECISION)
802
+ _length: _export.MathUtils.toFixedFloat((0, _convertUnitsLite.convert)(lengthValue).from(_constants.UNIT_CENTIMETER).to(value.get('_unit')), PRECISION)
803
803
  });
804
804
  attributesFormData = attributesFormData.set(attributeName, offsetAttribute);
805
805
  break;
@@ -823,10 +823,10 @@ function updateAttributeOfSelectedElement(element, attrPayload, state, layer, pr
823
823
  var _xp = _x0 - (_lengthValue + _halfWidthLength) * Math.cos(_alpha);
824
824
  var _yp = _y2 - (_lengthValue + _halfWidthLength) * Math.sin(_alpha);
825
825
  var _offset = _export.GeometryUtils.pointPositionOnLineSegment(_x9, _y, _x0, _y2, _xp, _yp);
826
- /*
827
- if (x0 > x1) offset = 1 - offset;
826
+ /*
827
+ if (x0 > x1) offset = 1 - offset;
828
828
  */
829
- var startAt = MathUtils.toFixedFloat(_lineLength * _offset - _halfWidthLength, PRECISION);
829
+ var startAt = _export.MathUtils.toFixedFloat(_lineLength * _offset - _halfWidthLength, PRECISION);
830
830
  var _offsetUnit = attributesFormData.getIn(['offsetA', '_unit']);
831
831
  var offsetA = new _immutable.Map({
832
832
  length: startAt,
@@ -835,9 +835,9 @@ function updateAttributeOfSelectedElement(element, attrPayload, state, layer, pr
835
835
  });
836
836
  attributesFormData = attributesFormData.set('offsetA', offsetA).set('offset', _offset);
837
837
  var _offsetAttribute = new _immutable.Map({
838
- length: MathUtils.toFixedFloat(_lengthValue, PRECISION),
838
+ length: _export.MathUtils.toFixedFloat(_lengthValue, PRECISION),
839
839
  _unit: value.get('_unit'),
840
- _length: MathUtils.toFixedFloat((0, _convertUnitsLite.convert)(_lengthValue).from(_constants.UNIT_CENTIMETER).to(value.get('_unit')), PRECISION)
840
+ _length: _export.MathUtils.toFixedFloat((0, _convertUnitsLite.convert)(_lengthValue).from(_constants.UNIT_CENTIMETER).to(value.get('_unit')), PRECISION)
841
841
  });
842
842
  attributesFormData = attributesFormData.set(attributeName, _offsetAttribute);
843
843
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kitchen-simulator",
3
- "version": "2.0.53",
3
+ "version": "2.0.54",
4
4
  "description": "It is a kitchen simulator (self-contained micro-frontend).",
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",