@realsee/dnalogel 0.1.4 → 0.1.7-alpha.3
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/components/ARVideoFigure/ARVideoFigureMesh.js +56 -32
- package/components/ARVideoFigure/ARVideoFigureScene.js +30 -19
- package/components/ARVideoFigure/ImgBgTransparent.js +22 -6
- package/components/ARVideoFigure/ImgBgTransparentMesh.js +40 -30
- package/components/ARVideoFigure/fragmentShader.js +2 -0
- package/components/ARVideoFigure/index.js +22 -6
- package/components/ARVideoFigure/vertexShader.js +2 -0
- package/components/GLTFView/index.d.ts +104 -0
- package/components/GLTFView/index.js +181 -0
- package/components/GlassFilters/index.js +25 -1
- package/components/ModelView/ModelViewController.js +39 -29
- package/components/ModelView/index.js +4 -2
- package/components/PaintBrush/index.js +15 -1
- package/components/PanoTag/index.js +2 -0
- package/data/1aGKl9JmrlXMXx8d.js +2 -0
- package/data/54djM0oR6ky3Ey8e.d.ts +55 -0
- package/data/54djM0oR6ky3Ey8e.js +350 -0
- package/data/6gyq3v1verxD7JO1.js +2 -0
- package/data/8054djM0oR6ky3Ey8e.js +2 -0
- package/data/KpokNd82rwjhackhQTBEoYKHg8zGbPXe.js +2 -0
- package/data/PrXel3aqGbp34JQn.js +141 -1
- package/data/XJ6NMLWnkAY3Rdx8.js +2 -0
- package/data/YdoNP9K4rwQDwjJr.js +2 -0
- package/data/ZLvK29zj4L29Jowd.d.ts +55 -0
- package/data/ZLvK29zj4L29Jowd.js +372 -0
- package/data/auto3d-njL5J99VwCmnjtQElOmXQr.js +2 -0
- package/data/extrude-walls/ZLvK29zj4L29Jowd.d.ts +5 -0
- package/data/extrude-walls/ZLvK29zj4L29Jowd.js +14 -0
- package/data/extrude-walls/lo024DEgzanMj5BE.d.ts +5 -0
- package/data/extrude-walls/lo024DEgzanMj5BE.js +14 -0
- package/data/jd6oMOzPxnQ3BvxY_B7yw51J9rXlhYhjhGTOgRVqu6WeEqjNX.js +2 -0
- package/data/lo024DEgzanMj5BE.d.ts +55 -0
- package/data/lo024DEgzanMj5BE.js +966 -0
- package/data/oPzy3ApbjjpD8YdR.js +2 -0
- package/data/qjAxMG4XbPn96wKG.js +2 -0
- package/data/rXel3aPQRRBD4JQn.js +2 -0
- package/data/vLykj3NWrllMrG06.js +337 -71
- package/data/wz0QV9KA4ugyo9ME.js +2 -0
- package/data/zxMawr9raSg8LYjG.js +2 -0
- package/examples/FiveStateController/index.js +9 -15
- package/examples/VRHouse/Mobile.js +15 -1
- package/examples/VRHouse/PC.js +15 -1
- package/examples/VRHouse/index.js +15 -1
- package/index.js +4 -2
- package/libs/gltf-viewer/Subscribe.d.ts +76 -0
- package/libs/gltf-viewer/Subscribe.js +231 -0
- package/libs/gltf-viewer/coordsMoveByOffset.d.ts +13 -0
- package/libs/gltf-viewer/coordsMoveByOffset.js +22 -0
- package/libs/gltf-viewer/coordsToDirection.d.ts +5 -0
- package/{components/PBRView/index.js → libs/gltf-viewer/coordsToDirection.js} +29 -19
- package/libs/gltf-viewer/formatRad.d.ts +1 -0
- package/libs/gltf-viewer/formatRad.js +13 -0
- package/libs/gltf-viewer/getFrameTime.d.ts +1 -0
- package/libs/gltf-viewer/getFrameTime.js +28 -0
- package/libs/gltf-viewer/index.d.ts +65 -0
- package/libs/gltf-viewer/index.js +704 -0
- package/libs/gltf-viewer/mouseWheel.d.ts +2 -0
- package/libs/gltf-viewer/mouseWheel.js +59 -0
- package/libs/gltf-viewer/requestAnimationFrame.d.ts +1 -0
- package/libs/gltf-viewer/requestAnimationFrame.js +18 -0
- package/libs/gltf-viewer/requestAnimationFrameInterval.d.ts +1 -0
- package/libs/gltf-viewer/requestAnimationFrameInterval.js +31 -0
- package/libs/gltf-viewer/uuid.d.ts +4 -0
- package/libs/gltf-viewer/uuid.js +28 -0
- package/package.json +8 -4
- package/plugins/AutoPreloadPlugin/index.js +26 -0
- package/plugins/CSS3DRenderPlugin/components/Marker/index.js +24 -16
- package/plugins/CSS3DRenderPlugin/index.js +31 -3
- package/plugins/CameraMovementPlugin/index.js +33 -9
- package/plugins/CameraMovementPlugin/typing.js +2 -0
- package/plugins/ModelChassisCompassPlugin/index.js +23 -9
- package/plugins/ModelEntryDoorGuidePlugin/index.d.ts +2 -2
- package/plugins/ModelEntryDoorGuidePlugin/index.js +43 -22
- package/plugins/ModelExtrudeWallsPlugin/index.d.ts +16 -0
- package/plugins/ModelExtrudeWallsPlugin/index.js +252 -0
- package/plugins/ModelRoomLabelPlugin/Controller.js +30 -23
- package/plugins/ModelRoomLabelPlugin/RoomLabelItem.js +26 -8
- package/plugins/ModelRoomLabelPlugin/RoomLabelItems.js +35 -25
- package/plugins/ModelRoomLabelPlugin/index.js +2 -0
- package/plugins/ModelRoomLabelPlugin/typings.js +2 -0
- package/plugins/ModelRoomLabelPlugin/utils/parseData.js +6 -0
- package/plugins/ModelTVVideoPlugin/index.js +100 -16
- package/plugins/ModelViewPlugin/index.js +25 -1
- package/plugins/PanoCursorRaycasterPlugin/components/MovePointTowardsCamera.js +29 -25
- package/plugins/PanoCursorRaycasterPlugin/components/PointAxesHelper.js +15 -1
- package/plugins/PanoCursorRaycasterPlugin/index.js +13 -6
- package/plugins/PanoCursorRaycasterPlugin/utils/addLineToFive.js +4 -2
- package/plugins/PanoCursorRaycasterPlugin/utils/createLine.js +15 -1
- package/plugins/PanoDoorLabelPlugin/index.js +2 -0
- package/plugins/PanoIRobotPlugin/index.js +2 -0
- package/plugins/PanoMaskSelectorPlugin/compare.js +2 -0
- package/plugins/PanoMaskSelectorPlugin/createBox.js +22 -1
- package/plugins/PanoMaskSelectorPlugin/createTextures.js +17 -1
- package/plugins/PanoMaskSelectorPlugin/fragmentShader.js +2 -0
- package/plugins/PanoMaskSelectorPlugin/index.js +88 -10
- package/plugins/PanoMaskSelectorPlugin/vertexShader.js +2 -0
- package/plugins/PanoRulerPlugin/data/roomInfo.js +2 -0
- package/plugins/PanoRulerPlugin/data/roomRules.js +2 -0
- package/plugins/PanoRulerPlugin/index.js +68 -20
- package/plugins/PanoRulerPlugin/typings.js +2 -0
- package/plugins/PanoTVVideoPlugin/index.d.ts +2 -0
- package/plugins/PanoTVVideoPlugin/index.js +108 -26
- package/plugins/TreasurePlugin/Controller.js +58 -52
- package/plugins/TreasurePlugin/TreasureFaceAnime.js +36 -21
- package/plugins/TreasurePlugin/TreasureObject.js +60 -56
- package/plugins/TreasurePlugin/TreasureOpenAnime.js +38 -19
- package/plugins/TreasurePlugin/constants.js +2 -0
- package/plugins/TreasurePlugin/index.js +2 -0
- package/plugins/TreasurePlugin/typings.js +2 -0
- package/plugins/floorplan/Assets/floorplanExtraObject.js +2 -0
- package/plugins/floorplan/ModelFloorplanPlugin/Controller.d.ts +5 -2
- package/plugins/floorplan/ModelFloorplanPlugin/Controller.js +93 -99
- package/plugins/floorplan/ModelFloorplanPlugin/components/Camera.js +25 -7
- package/plugins/floorplan/ModelFloorplanPlugin/components/Compass.js +22 -8
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomHighlight.js +28 -4
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomLabels.js +25 -5
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomMaterial.d.ts +11 -0
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomMaterial.js +174 -0
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RuleLabels.d.ts +8 -0
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RuleLabels.js +179 -0
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/index.d.ts +2 -0
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/index.js +32 -6
- package/plugins/floorplan/ModelFloorplanPlugin/components/index.d.ts +3 -0
- package/plugins/floorplan/ModelFloorplanPlugin/components/index.js +30 -8
- package/plugins/floorplan/ModelFloorplanPlugin/controller.style.js +2 -0
- package/plugins/floorplan/ModelFloorplanPlugin/index.js +4 -2
- package/plugins/floorplan/ModelFloorplanPlugin/typings/events.type.js +2 -0
- package/plugins/floorplan/ModelFloorplanPlugin/typings/utility.d.ts +2 -0
- package/plugins/floorplan/ModelFloorplanPlugin/typings/utility.js +7 -0
- package/plugins/floorplan/ModelFloorplanPlugin/utils/constant.d.ts +1 -1
- package/plugins/floorplan/ModelFloorplanPlugin/utils/constant.js +3 -1
- package/plugins/floorplan/ModelFloorplanPlugin/utils/correctFiveState.js +14 -22
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.js +25 -3
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.style.js +10 -6
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/ExtraObjects.js +21 -5
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/RoomHighlight.js +28 -4
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/index.js +22 -6
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.js +29 -19
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.style.js +2 -0
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Controller.js +44 -47
- package/plugins/floorplan/PanoFloorplanRadarPlugin/index.js +4 -2
- package/plugins/floorplan/TopviewFloorplanPlugin/Controller.js +53 -58
- package/plugins/floorplan/TopviewFloorplanPlugin/index.js +2 -0
- package/plugins/floorplan/TopviewFloorplanPlugin/style.js +2 -0
- package/plugins/floorplan/components/FloorplanImage.js +15 -1
- package/plugins/floorplan/typings/floorplanData.d.ts +2 -0
- package/plugins/floorplan/typings/floorplanData.js +2 -0
- package/plugins/floorplan/typings/floorplanServerData.d.ts +2 -0
- package/plugins/floorplan/typings/floorplanServerData.js +2 -0
- package/plugins/floorplan/utils/formatData.js +30 -11
- package/plugins/floorplan/utils/formatPosition.js +10 -8
- package/shared-utils/Preloader.js +6 -0
- package/shared-utils/Subscribe.js +36 -16
- package/shared-utils/animationFrame/BetterTween.js +28 -27
- package/shared-utils/animationFrame/calculateProgress.js +2 -0
- package/shared-utils/animationFrame/formatRad.js +2 -0
- package/shared-utils/animationFrame/index.js +12 -0
- package/shared-utils/animationFrame/tween.js +17 -1
- package/shared-utils/changeModelCanvasOpacity.d.ts +2 -0
- package/shared-utils/{changeModelCanvansOpacity.js → changeModelCanvasOpacity.js} +16 -2
- package/shared-utils/createCanvasTextTexture.js +2 -0
- package/shared-utils/createFiveContainer.js +23 -17
- package/shared-utils/createLine/index.js +15 -1
- package/shared-utils/debounce.js +4 -0
- package/shared-utils/equal.js +15 -4
- package/shared-utils/filter.js +36 -2
- package/shared-utils/five/changeMode.js +13 -17
- package/shared-utils/five/useFivePlugin.js +2 -0
- package/shared-utils/formatRad.js +2 -0
- package/shared-utils/getPxmm.js +15 -1
- package/shared-utils/getRandomColor.js +10 -0
- package/shared-utils/isNil.js +2 -0
- package/shared-utils/isTruelyObject.js +4 -0
- package/shared-utils/math/evenNumber.js +2 -0
- package/shared-utils/math/planimetry.js +10 -0
- package/shared-utils/math/rad2Deg.js +2 -0
- package/shared-utils/nearlyEqual.js +2 -0
- package/shared-utils/nextFrame.js +2 -0
- package/shared-utils/noop.js +2 -0
- package/shared-utils/object3d2LocalMatrix.js +20 -14
- package/shared-utils/px2rem.js +10 -0
- package/shared-utils/tap.js +2 -0
- package/shared-utils/three/centerPoint.js +2 -0
- package/shared-utils/three/getExtraModelLoader.js +14 -0
- package/shared-utils/three/getNormal.js +4 -0
- package/shared-utils/three/getTextureLoader.js +16 -0
- package/shared-utils/three/loadFbxObj.js +13 -5
- package/shared-utils/three/loadTexture.d.ts +2 -2
- package/shared-utils/three/loadTexture.js +33 -6
- package/shared-utils/three/transformPositionToVector3.js +2 -0
- package/shared-utils/three/transfromToMeshBasicMaterial.js +6 -0
- package/shared-utils/throttle.js +4 -0
- package/shared-utils/to.js +8 -4
- package/shared-utils/useDebounce.js +6 -0
- package/shared-utils/useThrottle.js +6 -0
- package/shared-utils/uuid.js +8 -0
- package/shared-utils/vectorTocoordinates.js +2 -0
- package/typedoc/components.js +2 -0
- package/typedoc/libs.d.ts +1 -0
- package/typedoc/libs.js +7 -0
- package/typedoc/plugins.js +2 -0
- package/typedoc/shared-utils.js +2 -0
- package/typedoc/typings.js +2 -0
- package/typings/math.type.js +2 -0
- package/typings/utils.type.js +2 -0
- package/components/PBRView/index.d.ts +0 -14
- package/shared-utils/changeModelCanvansOpacity.d.ts +0 -2
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
require("core-js/modules/es.array.iterator.js");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.object.to-string.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.string.iterator.js");
|
|
8
|
+
|
|
9
|
+
require("core-js/modules/es.weak-map.js");
|
|
10
|
+
|
|
11
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
12
|
+
|
|
13
|
+
require("core-js/modules/es.object.define-property.js");
|
|
14
|
+
|
|
15
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
16
|
+
|
|
17
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
18
|
+
|
|
19
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
20
|
|
|
5
21
|
Object.defineProperty(exports, "__esModule", {
|
|
6
22
|
value: true
|
|
@@ -11,8 +27,6 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
11
27
|
|
|
12
28
|
var _px2rem = _interopRequireDefault(require("../../../../shared-utils/px2rem"));
|
|
13
29
|
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
-
|
|
16
30
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
31
|
|
|
18
32
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -24,11 +38,11 @@ function Compass(props) {
|
|
|
24
38
|
if (!northRad) return null;
|
|
25
39
|
var rotate = rad2Deg(northRad);
|
|
26
40
|
var compassStyle = {
|
|
27
|
-
width:
|
|
28
|
-
height:
|
|
41
|
+
width: (0, _px2rem["default"])(231),
|
|
42
|
+
height: (0, _px2rem["default"])(41),
|
|
29
43
|
position: 'absolute',
|
|
30
44
|
left: '50%',
|
|
31
|
-
top:
|
|
45
|
+
top: (0, _px2rem["default"])(-46),
|
|
32
46
|
willChange: 'opacity',
|
|
33
47
|
transformOrigin: "center ".concat((0, _px2rem["default"])(184)),
|
|
34
48
|
transform: "translateX(-50%) translateZ(10px) rotate(".concat(-rotate + 90, "deg)")
|
|
@@ -46,11 +60,11 @@ function Compass(props) {
|
|
|
46
60
|
var textStyle = {
|
|
47
61
|
position: 'absolute',
|
|
48
62
|
left: '50%',
|
|
49
|
-
top:
|
|
63
|
+
top: (0, _px2rem["default"])(15),
|
|
50
64
|
transform: 'translateX(-50%)',
|
|
51
65
|
opacity: '.2',
|
|
52
66
|
fontWeight: 'bold',
|
|
53
|
-
fontSize:
|
|
67
|
+
fontSize: (0, _px2rem["default"])(10),
|
|
54
68
|
color: '#fff'
|
|
55
69
|
};
|
|
56
70
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -1,12 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
require("core-js/modules/es.array.iterator.js");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.object.to-string.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.string.iterator.js");
|
|
8
|
+
|
|
9
|
+
require("core-js/modules/es.weak-map.js");
|
|
10
|
+
|
|
11
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
12
|
+
|
|
13
|
+
require("core-js/modules/es.object.define-property.js");
|
|
14
|
+
|
|
15
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
16
|
+
|
|
17
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
18
|
+
|
|
19
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
20
|
|
|
5
21
|
Object.defineProperty(exports, "__esModule", {
|
|
6
22
|
value: true
|
|
7
23
|
});
|
|
8
24
|
exports["default"] = RoomHighlight;
|
|
9
25
|
|
|
26
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
27
|
+
|
|
28
|
+
require("core-js/modules/es.string.sub.js");
|
|
29
|
+
|
|
30
|
+
require("core-js/modules/es.array.sort.js");
|
|
31
|
+
|
|
32
|
+
require("core-js/modules/es.array.filter.js");
|
|
33
|
+
|
|
34
|
+
require("core-js/modules/es.array.map.js");
|
|
35
|
+
|
|
10
36
|
var React = _interopRequireWildcard(require("react"));
|
|
11
37
|
|
|
12
38
|
var _three = require("three");
|
|
@@ -17,8 +43,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
17
43
|
|
|
18
44
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
45
|
|
|
20
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
21
|
-
|
|
22
46
|
function RoomHighlight(props) {
|
|
23
47
|
if (!props.five.work || !props.five.model) return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
24
48
|
var nowFloorData = props.floorplanData.floorDatas[props.floorIndex];
|
|
@@ -66,7 +90,7 @@ function RoomHighlight(props) {
|
|
|
66
90
|
}, /*#__PURE__*/React.createElement("svg", {
|
|
67
91
|
style: svgStyle
|
|
68
92
|
}, nowFloorData.rooms.map(function (room) {
|
|
69
|
-
return /*#__PURE__*/React.createElement(Room,
|
|
93
|
+
return /*#__PURE__*/React.createElement(Room, (0, _extends2["default"])({
|
|
70
94
|
key: room.id
|
|
71
95
|
}, props, {
|
|
72
96
|
data: room
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
require("core-js/modules/es.array.iterator.js");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.object.to-string.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.string.iterator.js");
|
|
8
|
+
|
|
9
|
+
require("core-js/modules/es.weak-map.js");
|
|
10
|
+
|
|
11
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
12
|
+
|
|
13
|
+
require("core-js/modules/es.object.define-property.js");
|
|
14
|
+
|
|
15
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
16
|
+
|
|
17
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
18
|
+
|
|
19
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
20
|
|
|
5
21
|
Object.defineProperty(exports, "__esModule", {
|
|
6
22
|
value: true
|
|
@@ -8,12 +24,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
24
|
exports.RoomLabel = RoomLabel;
|
|
9
25
|
exports["default"] = RoomLabels;
|
|
10
26
|
|
|
27
|
+
require("core-js/modules/es.array.map.js");
|
|
28
|
+
|
|
29
|
+
require("core-js/modules/es.number.to-fixed.js");
|
|
30
|
+
|
|
31
|
+
require("core-js/modules/es.function.name.js");
|
|
32
|
+
|
|
11
33
|
var React = _interopRequireWildcard(require("react"));
|
|
12
34
|
|
|
13
35
|
var _px2rem = _interopRequireDefault(require("../../../../../shared-utils/px2rem"));
|
|
14
36
|
|
|
15
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
16
|
-
|
|
17
37
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
18
38
|
|
|
19
39
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -60,8 +80,8 @@ function RoomLabel(props) {
|
|
|
60
80
|
display: 'flex',
|
|
61
81
|
flexFlow: 'column',
|
|
62
82
|
alignItems: 'center',
|
|
63
|
-
fontSize:
|
|
64
|
-
lineHeight:
|
|
83
|
+
fontSize: (0, _px2rem["default"])(10),
|
|
84
|
+
lineHeight: (0, _px2rem["default"])(15),
|
|
65
85
|
color: '#fff',
|
|
66
86
|
transform: 'translate(-50%, -50%)',
|
|
67
87
|
whiteSpace: 'nowrap'
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FloorplanData, FloorplanRoomItem } from '../../../typings/floorplanData';
|
|
3
|
+
/** 为不同的房间添加不同的样式 */
|
|
4
|
+
export default function RoomMaterial(props: {
|
|
5
|
+
floorIndex: number;
|
|
6
|
+
floorplanData: FloorplanData;
|
|
7
|
+
pxmm: number;
|
|
8
|
+
}): JSX.Element;
|
|
9
|
+
export declare function RoomMaterialSwitch(props: {
|
|
10
|
+
room: FloorplanRoomItem;
|
|
11
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.array.iterator.js");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.object.to-string.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.string.iterator.js");
|
|
8
|
+
|
|
9
|
+
require("core-js/modules/es.weak-map.js");
|
|
10
|
+
|
|
11
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
12
|
+
|
|
13
|
+
require("core-js/modules/es.object.define-property.js");
|
|
14
|
+
|
|
15
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
16
|
+
|
|
17
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
18
|
+
|
|
19
|
+
Object.defineProperty(exports, "__esModule", {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
exports.RoomMaterialSwitch = RoomMaterialSwitch;
|
|
23
|
+
exports["default"] = RoomMaterial;
|
|
24
|
+
|
|
25
|
+
require("core-js/modules/es.array.map.js");
|
|
26
|
+
|
|
27
|
+
require("core-js/modules/es.object.assign.js");
|
|
28
|
+
|
|
29
|
+
require("core-js/modules/es.array.concat.js");
|
|
30
|
+
|
|
31
|
+
var React = _interopRequireWildcard(require("react"));
|
|
32
|
+
|
|
33
|
+
var _formatPosition = _interopRequireWildcard(require("../../../utils/formatPosition"));
|
|
34
|
+
|
|
35
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
36
|
+
|
|
37
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
38
|
+
|
|
39
|
+
/** 为不同的房间添加不同的样式 */
|
|
40
|
+
function RoomMaterial(props) {
|
|
41
|
+
var bounding = props.floorplanData.bounding;
|
|
42
|
+
var rooms = props.floorplanData.floorDatas[props.floorIndex].rooms;
|
|
43
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
className: "floorplan__floor-item floorplan__room-material"
|
|
45
|
+
}, rooms // 户型图坐标转 Svg 坐标
|
|
46
|
+
.map(function (room) {
|
|
47
|
+
return Object.assign({}, room, {
|
|
48
|
+
path: room.path.map(function (p) {
|
|
49
|
+
return (0, _formatPosition["default"])(p, props.pxmm, bounding);
|
|
50
|
+
})
|
|
51
|
+
});
|
|
52
|
+
}).map(function (room) {
|
|
53
|
+
return /*#__PURE__*/React.createElement(RoomMaterialSvgWrapper, {
|
|
54
|
+
key: room.id
|
|
55
|
+
}, /*#__PURE__*/React.createElement(RoomMaterialSwitch, {
|
|
56
|
+
room: room
|
|
57
|
+
}));
|
|
58
|
+
}));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function RoomMaterialSwitch(props) {
|
|
62
|
+
var floorType = props.room.floorType;
|
|
63
|
+
if (floorType === 1) return /*#__PURE__*/React.createElement(RoomMaterial_0, {
|
|
64
|
+
path: props.room.path
|
|
65
|
+
});
|
|
66
|
+
if (floorType === 0) return /*#__PURE__*/React.createElement(RoomMaterial_2, {
|
|
67
|
+
path: props.room.path
|
|
68
|
+
});
|
|
69
|
+
return /*#__PURE__*/React.createElement(RoomMaterial_1, {
|
|
70
|
+
path: props.room.path
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function RoomMaterialSvgWrapper(props) {
|
|
75
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
76
|
+
style: {
|
|
77
|
+
position: 'absolute',
|
|
78
|
+
width: '100%',
|
|
79
|
+
height: '100%',
|
|
80
|
+
overflow: 'visible'
|
|
81
|
+
}
|
|
82
|
+
}, props.children);
|
|
83
|
+
}
|
|
84
|
+
/** 纯色背景 */
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
function RoomMaterial_0(props) {
|
|
88
|
+
var d = (0, _formatPosition.pathD)(props.path, {
|
|
89
|
+
needZ: true
|
|
90
|
+
});
|
|
91
|
+
return /*#__PURE__*/React.createElement("path", {
|
|
92
|
+
d: d,
|
|
93
|
+
fill: "#2F313A"
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
/** 瓷砖地板,偏蓝的格格 */
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
function RoomMaterial_1(props) {
|
|
100
|
+
var d = (0, _formatPosition.pathD)(props.path, {
|
|
101
|
+
needZ: true
|
|
102
|
+
});
|
|
103
|
+
var halfWidth = 6;
|
|
104
|
+
var width = halfWidth * 2;
|
|
105
|
+
var patternPathD = "M0 ".concat(halfWidth, " h ").concat(width, " M").concat(halfWidth, " 0 v ").concat(width);
|
|
106
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("pattern", {
|
|
107
|
+
id: "fpm-room-pattern-0",
|
|
108
|
+
x: "0",
|
|
109
|
+
y: "0",
|
|
110
|
+
width: width,
|
|
111
|
+
height: width,
|
|
112
|
+
patternUnits: "userSpaceOnUse"
|
|
113
|
+
}, /*#__PURE__*/React.createElement("rect", {
|
|
114
|
+
x: "0",
|
|
115
|
+
y: "0",
|
|
116
|
+
width: width,
|
|
117
|
+
height: width,
|
|
118
|
+
fill: "#323747"
|
|
119
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
120
|
+
d: patternPathD,
|
|
121
|
+
stroke: "#ffffff",
|
|
122
|
+
strokeOpacity: "0.06",
|
|
123
|
+
strokeWidth: "0.5",
|
|
124
|
+
fill: "none"
|
|
125
|
+
}))), /*#__PURE__*/React.createElement("path", {
|
|
126
|
+
d: d,
|
|
127
|
+
fill: "url(#fpm-room-pattern-0)"
|
|
128
|
+
}));
|
|
129
|
+
}
|
|
130
|
+
/** 木地板,偏灰的格格 */
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
function RoomMaterial_2(props) {
|
|
134
|
+
var d = (0, _formatPosition.pathD)(props.path, {
|
|
135
|
+
needZ: true
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
var PatternRect = function PatternRect() {
|
|
139
|
+
return /*#__PURE__*/React.createElement("rect", {
|
|
140
|
+
x: "0.5",
|
|
141
|
+
y: "0.5",
|
|
142
|
+
width: "6",
|
|
143
|
+
height: "50",
|
|
144
|
+
fill: "none",
|
|
145
|
+
stroke: "#4B4B57",
|
|
146
|
+
strokeWidth: "0.5"
|
|
147
|
+
});
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("pattern", {
|
|
151
|
+
id: "room-material-pattern-1",
|
|
152
|
+
x: "0",
|
|
153
|
+
y: "0",
|
|
154
|
+
width: "13",
|
|
155
|
+
height: "51",
|
|
156
|
+
patternUnits: "userSpaceOnUse"
|
|
157
|
+
}, /*#__PURE__*/React.createElement(PatternRect, null)), /*#__PURE__*/React.createElement("pattern", {
|
|
158
|
+
id: "room-material-pattern-2",
|
|
159
|
+
x: "7",
|
|
160
|
+
y: "25",
|
|
161
|
+
width: "13",
|
|
162
|
+
height: "51",
|
|
163
|
+
patternUnits: "userSpaceOnUse"
|
|
164
|
+
}, /*#__PURE__*/React.createElement(PatternRect, null))), /*#__PURE__*/React.createElement("path", {
|
|
165
|
+
d: d,
|
|
166
|
+
fill: "#43434D"
|
|
167
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
168
|
+
d: d,
|
|
169
|
+
fill: "url(#room-material-pattern-1)"
|
|
170
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
171
|
+
d: d,
|
|
172
|
+
fill: "url(#room-material-pattern-2)"
|
|
173
|
+
}));
|
|
174
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FloorplanData } from '../../../typings/floorplanData';
|
|
3
|
+
/** 展示当前楼层的户型图对应上下左右的标尺 */
|
|
4
|
+
export default function RuleLabels(props: {
|
|
5
|
+
floorIndex: number;
|
|
6
|
+
floorplanData: FloorplanData;
|
|
7
|
+
pxmm: number;
|
|
8
|
+
}): JSX.Element | null;
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports["default"] = RuleLabels;
|
|
11
|
+
|
|
12
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
+
|
|
14
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
|
+
|
|
16
|
+
require("core-js/modules/es.array.map.js");
|
|
17
|
+
|
|
18
|
+
require("core-js/modules/es.object.keys.js");
|
|
19
|
+
|
|
20
|
+
require("core-js/modules/es.array.filter.js");
|
|
21
|
+
|
|
22
|
+
require("core-js/modules/es.array.sort.js");
|
|
23
|
+
|
|
24
|
+
require("core-js/modules/es.array.flat.js");
|
|
25
|
+
|
|
26
|
+
require("core-js/modules/es.array.slice.js");
|
|
27
|
+
|
|
28
|
+
require("core-js/modules/es.array.concat.js");
|
|
29
|
+
|
|
30
|
+
require("core-js/modules/es.object.assign.js");
|
|
31
|
+
|
|
32
|
+
var _react = _interopRequireDefault(require("react"));
|
|
33
|
+
|
|
34
|
+
var _px2rem = _interopRequireDefault(require("../../../../../shared-utils/px2rem"));
|
|
35
|
+
|
|
36
|
+
var _isNil = require("../../../../../shared-utils/isNil");
|
|
37
|
+
|
|
38
|
+
var padding = 1000;
|
|
39
|
+
|
|
40
|
+
/** 展示当前楼层的户型图对应上下左右的标尺 */
|
|
41
|
+
function RuleLabels(props) {
|
|
42
|
+
var currentFloorDatas = props.floorplanData.floorDatas[props.floorIndex];
|
|
43
|
+
var bounding = props.floorplanData.bounding;
|
|
44
|
+
var ruleLabels = currentFloorDatas.rules;
|
|
45
|
+
if (!ruleLabels) return null;
|
|
46
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
47
|
+
className: "floorplan-plugin__rulelabels"
|
|
48
|
+
}, Object.keys(ruleLabels).map(function (direction) {
|
|
49
|
+
return /*#__PURE__*/_react["default"].createElement(RulesItem, {
|
|
50
|
+
key: direction,
|
|
51
|
+
data: ruleLabels[direction],
|
|
52
|
+
type: direction,
|
|
53
|
+
bounding: bounding,
|
|
54
|
+
pxmm: props.pxmm
|
|
55
|
+
});
|
|
56
|
+
}));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function RulesItem(props) {
|
|
60
|
+
var _rulesStyle;
|
|
61
|
+
|
|
62
|
+
var pxmm = props.pxmm,
|
|
63
|
+
bounding = props.bounding,
|
|
64
|
+
type = props.type,
|
|
65
|
+
data = props.data;
|
|
66
|
+
var isTop = type === 'top';
|
|
67
|
+
var isBottom = type === 'bottom';
|
|
68
|
+
var isLeft = type === 'left';
|
|
69
|
+
var isRight = type === 'right';
|
|
70
|
+
var isRow = isTop || isBottom; // 计算每一段墙的长度,以及墙两侧点距离标尺初始点的像素值
|
|
71
|
+
|
|
72
|
+
var positionArray = data.map(function (_ref) {
|
|
73
|
+
var _ref2 = (0, _slicedToArray2["default"])(_ref, 2),
|
|
74
|
+
start = _ref2[0],
|
|
75
|
+
end = _ref2[1];
|
|
76
|
+
|
|
77
|
+
return isRow ? [start.x, end.x] : [start.y, end.y];
|
|
78
|
+
}).flat().sort().filter(function (x, index, arr) {
|
|
79
|
+
if (index === 0) return true;
|
|
80
|
+
return x !== arr[index - 1];
|
|
81
|
+
});
|
|
82
|
+
var minPosition = positionArray[0];
|
|
83
|
+
var maxPosition = positionArray.slice(-1)[0];
|
|
84
|
+
var length = maxPosition - minPosition;
|
|
85
|
+
var minBounding = isRow ? bounding.min.x : bounding.min.y;
|
|
86
|
+
var lengthPx = length * pxmm;
|
|
87
|
+
var positionPxArray = positionArray.map(function (x) {
|
|
88
|
+
return (x - minPosition) / length * lengthPx;
|
|
89
|
+
}); // 在主要方向上的偏移量,上下的标尺是距离图片左侧的长度,左右的标尺是距离图片底部的距离
|
|
90
|
+
|
|
91
|
+
var translateMain = (minPosition - minBounding) * pxmm; // 在次要方向的偏移量,希望达到的效果是标尺轴距离户型图边界 27px,但是图片自身是带有 1000mm 的边界,所以在计算时需要减去这个边界
|
|
92
|
+
|
|
93
|
+
var translateSecond = 27 - padding * pxmm;
|
|
94
|
+
|
|
95
|
+
var transform = function () {
|
|
96
|
+
if (isTop) return "translate(".concat(translateMain, "px, ").concat(-translateSecond, "px)");
|
|
97
|
+
if (isBottom) return "translate(".concat(translateMain, "px, ").concat(translateSecond, "px)");
|
|
98
|
+
if (isLeft) return "translate(".concat(-translateSecond, "px, ").concat(-translateMain, "px)");
|
|
99
|
+
if (isRight) return "translate(".concat(translateSecond, "px, ").concat(translateMain, "px)");
|
|
100
|
+
}(); // 把点位的户型图坐标转成距离起始位置的像素值
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
var textArray = positionArray.map(function (position, index, array) {
|
|
104
|
+
if (index === 0) return;
|
|
105
|
+
var distance = position - array[index - 1];
|
|
106
|
+
var positionPx = (array[index - 1] + distance / 2 - minPosition) / length * lengthPx;
|
|
107
|
+
return {
|
|
108
|
+
distance: distance,
|
|
109
|
+
positionPx: positionPx
|
|
110
|
+
};
|
|
111
|
+
}).filter(_isNil.notNil).filter(function (item) {
|
|
112
|
+
return item.distance / length > 0.12;
|
|
113
|
+
});
|
|
114
|
+
var rulesStyle = (_rulesStyle = {
|
|
115
|
+
position: 'absolute',
|
|
116
|
+
transform: "".concat(transform, " ").concat(isRow ? '' : 'rotate(-90deg)'),
|
|
117
|
+
transformOrigin: "".concat(isRight ? 'right top' : '').concat(isLeft ? 'left bottom' : ''),
|
|
118
|
+
left: isRow ? 0 : undefined,
|
|
119
|
+
top: isRight ? 0 : undefined,
|
|
120
|
+
bottom: isLeft ? 0 : undefined
|
|
121
|
+
}, (0, _defineProperty2["default"])(_rulesStyle, type, 0), (0, _defineProperty2["default"])(_rulesStyle, "width", lengthPx + 'px'), (0, _defineProperty2["default"])(_rulesStyle, "height", (0, _px2rem["default"])(5)), (0, _defineProperty2["default"])(_rulesStyle, "display", 'flex'), (0, _defineProperty2["default"])(_rulesStyle, "alignItems", 'center'), _rulesStyle);
|
|
122
|
+
var ruleLineStyle = {
|
|
123
|
+
background: '#fff',
|
|
124
|
+
opacity: 0.05,
|
|
125
|
+
width: '100%',
|
|
126
|
+
height: (0, _px2rem["default"])(1)
|
|
127
|
+
};
|
|
128
|
+
var ruleScaleStyle = {
|
|
129
|
+
position: 'absolute',
|
|
130
|
+
background: '#fff',
|
|
131
|
+
opacity: 0.05,
|
|
132
|
+
transformOrigin: 'center',
|
|
133
|
+
width: (0, _px2rem["default"])(1),
|
|
134
|
+
height: (0, _px2rem["default"])(5)
|
|
135
|
+
};
|
|
136
|
+
var isRightOrBottom = isRight || isBottom;
|
|
137
|
+
var textWrapperStyle = {
|
|
138
|
+
width: 0,
|
|
139
|
+
height: 0,
|
|
140
|
+
position: 'absolute',
|
|
141
|
+
bottom: isRightOrBottom ? (0, _px2rem["default"])(10) : undefined,
|
|
142
|
+
top: isRightOrBottom ? undefined : (0, _px2rem["default"])(10)
|
|
143
|
+
};
|
|
144
|
+
var textStyle = {
|
|
145
|
+
position: 'absolute',
|
|
146
|
+
width: 'max-content',
|
|
147
|
+
display: 'block',
|
|
148
|
+
transform: "translate(-50%, -50%) ".concat(isRow ? '' : 'rotate(180deg)'),
|
|
149
|
+
fontSize: (0, _px2rem["default"])(10),
|
|
150
|
+
color: '#fff',
|
|
151
|
+
opacity: 0.2
|
|
152
|
+
};
|
|
153
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
154
|
+
className: "rule-labels-".concat(type),
|
|
155
|
+
style: rulesStyle
|
|
156
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
157
|
+
className: "rule-line",
|
|
158
|
+
style: ruleLineStyle
|
|
159
|
+
}), positionPxArray.map(function (position, index) {
|
|
160
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
161
|
+
key: index,
|
|
162
|
+
className: "rule-scale",
|
|
163
|
+
style: Object.assign({
|
|
164
|
+
left: "".concat(position, "px")
|
|
165
|
+
}, ruleScaleStyle)
|
|
166
|
+
});
|
|
167
|
+
}), textArray.map(function (textItem, index) {
|
|
168
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
169
|
+
key: index,
|
|
170
|
+
className: "text-wrapper",
|
|
171
|
+
style: Object.assign({
|
|
172
|
+
left: "".concat(textItem.positionPx, "px")
|
|
173
|
+
}, textWrapperStyle)
|
|
174
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
175
|
+
className: "text",
|
|
176
|
+
style: textStyle
|
|
177
|
+
}, textItem.distance));
|
|
178
|
+
}));
|
|
179
|
+
}
|
|
@@ -7,6 +7,8 @@ export default function NowFloor(props: {
|
|
|
7
7
|
visible: boolean;
|
|
8
8
|
floorIndex: number;
|
|
9
9
|
hoverEnable?: boolean;
|
|
10
|
+
ruleLabelsEnable?: boolean;
|
|
11
|
+
roomLabelsEnable?: boolean;
|
|
10
12
|
floorplanData: FloorplanData;
|
|
11
13
|
getLabelElement?: (room: FloorplanRoomItem) => Element | null;
|
|
12
14
|
onRoomHeightClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => boolean | void;
|
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
require("core-js/modules/es.array.iterator.js");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.object.to-string.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.string.iterator.js");
|
|
8
|
+
|
|
9
|
+
require("core-js/modules/es.weak-map.js");
|
|
10
|
+
|
|
11
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
12
|
+
|
|
13
|
+
require("core-js/modules/es.object.define-property.js");
|
|
14
|
+
|
|
15
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
16
|
+
|
|
17
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
18
|
+
|
|
19
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
20
|
|
|
5
21
|
Object.defineProperty(exports, "__esModule", {
|
|
6
22
|
value: true
|
|
7
23
|
});
|
|
8
24
|
exports["default"] = NowFloor;
|
|
9
25
|
|
|
26
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
27
|
+
|
|
10
28
|
var React = _interopRequireWildcard(require("react"));
|
|
11
29
|
|
|
12
30
|
var _RoomLabels = _interopRequireDefault(require("./RoomLabels"));
|
|
@@ -15,14 +33,14 @@ var _RoomHighlight = _interopRequireDefault(require("./RoomHighlight"));
|
|
|
15
33
|
|
|
16
34
|
var _FloorplanImage = _interopRequireDefault(require("../../../components/FloorplanImage"));
|
|
17
35
|
|
|
18
|
-
|
|
36
|
+
var _RuleLabels = _interopRequireDefault(require("./RuleLabels"));
|
|
37
|
+
|
|
38
|
+
var _RoomMaterial = _interopRequireDefault(require("./RoomMaterial"));
|
|
19
39
|
|
|
20
40
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
41
|
|
|
22
42
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
43
|
|
|
24
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
|
-
|
|
26
44
|
function NowFloor(props) {
|
|
27
45
|
var floorplanData = props.floorplanData,
|
|
28
46
|
floorIndex = props.floorIndex,
|
|
@@ -35,14 +53,22 @@ function NowFloor(props) {
|
|
|
35
53
|
return /*#__PURE__*/React.createElement("div", {
|
|
36
54
|
className: "now-floor",
|
|
37
55
|
style: floorStyle
|
|
38
|
-
},
|
|
56
|
+
}, /*#__PURE__*/React.createElement(_RoomMaterial["default"], {
|
|
57
|
+
floorplanData: floorplanData,
|
|
58
|
+
floorIndex: floorIndex,
|
|
59
|
+
pxmm: props.pxmm
|
|
60
|
+
}), !!props.hoverEnable && props.visible && /*#__PURE__*/React.createElement(_RoomHighlight["default"], (0, _extends2["default"])({}, props, {
|
|
39
61
|
onClick: props.onRoomHeightClick
|
|
40
62
|
})), /*#__PURE__*/React.createElement(_FloorplanImage["default"], {
|
|
41
63
|
floorplanData: floorplanData,
|
|
42
64
|
floorIndex: floorIndex
|
|
43
|
-
}), /*#__PURE__*/React.createElement(_RoomLabels["default"], {
|
|
65
|
+
}), !!props.roomLabelsEnable && /*#__PURE__*/React.createElement(_RoomLabels["default"], {
|
|
44
66
|
floorplanData: floorplanData,
|
|
45
67
|
floorIndex: floorIndex,
|
|
46
68
|
getLabelElement: getLabelElement
|
|
69
|
+
}), !!props.ruleLabelsEnable && /*#__PURE__*/React.createElement(_RuleLabels["default"], {
|
|
70
|
+
floorplanData: floorplanData,
|
|
71
|
+
floorIndex: floorIndex,
|
|
72
|
+
pxmm: props.pxmm
|
|
47
73
|
}));
|
|
48
74
|
}
|
|
@@ -9,6 +9,9 @@ declare const _default: React.NamedExoticComponent<{
|
|
|
9
9
|
panoIndex: number;
|
|
10
10
|
floorIndex: number;
|
|
11
11
|
hoverEnable?: boolean | undefined;
|
|
12
|
+
compassEnable?: boolean | undefined;
|
|
13
|
+
ruleLabelsEnable?: boolean | undefined;
|
|
14
|
+
roomLabelsEnable?: boolean | undefined;
|
|
12
15
|
lastPanoramaLongitude: number;
|
|
13
16
|
floorplanData?: FloorplanData | undefined;
|
|
14
17
|
cameraImage?: {
|