kitchen-simulator 4.2.3 → 4.2.5
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/es/devLiteRenderer.js +1 -0
- package/es/utils/ruler.js +2 -2
- package/lib/devLiteRenderer.js +1 -0
- package/lib/utils/ruler.js +2 -2
- package/package.json +1 -1
package/es/devLiteRenderer.js
CHANGED
package/es/utils/ruler.js
CHANGED
|
@@ -5,7 +5,7 @@ import { UNIT_CENTIMETER, UNIT_INCH, UNIT_MILLIMETER } from "../constants";
|
|
|
5
5
|
var MIN_LENGTH_TO_SHOW_RULER_LINE_INCH = 13;
|
|
6
6
|
|
|
7
7
|
// Below this length, the measurement VALUE (text) is hidden
|
|
8
|
-
var MIN_LENGTH_TO_SHOW_RULER_VALUE_INCH =
|
|
8
|
+
var MIN_LENGTH_TO_SHOW_RULER_VALUE_INCH = 3;
|
|
9
9
|
function formatDistance(value, fixed) {
|
|
10
10
|
// format with fixed decimals first
|
|
11
11
|
var text = value.toFixed(fixed);
|
|
@@ -32,7 +32,7 @@ export function getRulerDisplayData(_ref) {
|
|
|
32
32
|
charWidth = _ref$charWidth === void 0 ? 8 : _ref$charWidth;
|
|
33
33
|
// 7.62 cm -> ruLength 2.99 in
|
|
34
34
|
var ruLength = convert(length).from(unit).to(rulerUnit);
|
|
35
|
-
var fixedLength = layerUnit === UNIT_MILLIMETER ? 0 : layerUnit === UNIT_CENTIMETER ? 1 : 2;
|
|
35
|
+
var fixedLength = layerUnit === UNIT_INCH ? 0 : layerUnit === UNIT_MILLIMETER ? 0 : layerUnit === UNIT_CENTIMETER ? 1 : 2;
|
|
36
36
|
|
|
37
37
|
// 2.99 in -> valueInLayerUnit 2.99 in
|
|
38
38
|
var valueInLayerUnit = convert(ruLength).from(rulerUnit).to(layerUnit);
|
package/lib/devLiteRenderer.js
CHANGED
package/lib/utils/ruler.js
CHANGED
|
@@ -10,7 +10,7 @@ var _constants = require("../constants");
|
|
|
10
10
|
var MIN_LENGTH_TO_SHOW_RULER_LINE_INCH = 13;
|
|
11
11
|
|
|
12
12
|
// Below this length, the measurement VALUE (text) is hidden
|
|
13
|
-
var MIN_LENGTH_TO_SHOW_RULER_VALUE_INCH =
|
|
13
|
+
var MIN_LENGTH_TO_SHOW_RULER_VALUE_INCH = 3;
|
|
14
14
|
function formatDistance(value, fixed) {
|
|
15
15
|
// format with fixed decimals first
|
|
16
16
|
var text = value.toFixed(fixed);
|
|
@@ -37,7 +37,7 @@ function getRulerDisplayData(_ref) {
|
|
|
37
37
|
charWidth = _ref$charWidth === void 0 ? 8 : _ref$charWidth;
|
|
38
38
|
// 7.62 cm -> ruLength 2.99 in
|
|
39
39
|
var ruLength = (0, _convertUnitsLite.convert)(length).from(unit).to(rulerUnit);
|
|
40
|
-
var fixedLength = layerUnit === _constants.UNIT_MILLIMETER ? 0 : layerUnit === _constants.UNIT_CENTIMETER ? 1 : 2;
|
|
40
|
+
var fixedLength = layerUnit === _constants.UNIT_INCH ? 0 : layerUnit === _constants.UNIT_MILLIMETER ? 0 : layerUnit === _constants.UNIT_CENTIMETER ? 1 : 2;
|
|
41
41
|
|
|
42
42
|
// 2.99 in -> valueInLayerUnit 2.99 in
|
|
43
43
|
var valueInLayerUnit = (0, _convertUnitsLite.convert)(ruLength).from(rulerUnit).to(layerUnit);
|