Skip to content

Commit

Permalink
Merge pull request #79 from yushiang-demo/dev
Browse files Browse the repository at this point in the history
v2.1.2
  • Loading branch information
tsengyushiang authored Mar 5, 2024
2 parents d45dab8 + 35cb845 commit d9ea085
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
17 changes: 15 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ The format is based on [Keep a Changelog](https://github.com/olivierlacan/keep-a

### Removed

## [2.1.2] - 2024-03-05

### Added

### Changed

### Fixed

- Fix `decoration`, `viewer` pages runtime error. (https://github.com/yushiang-demo/pano-to-mesh/pull/78)

### Removed

## [2.1.1] - 2024-03-05

### Added
Expand Down Expand Up @@ -225,8 +237,9 @@ Codes without pull requests won't be recorded.

### Removed

[unreleased]: https://github.com/yushiang-demo/PanoToMesh/compare/v2.1.1...HEAD
[2.1.1]: https://github.com/yushiang-demo/PanoToMesh/compare/v2.0.0...v2.1.0
[unreleased]: https://github.com/yushiang-demo/PanoToMesh/compare/v2.1.2...HEAD
[2.1.2]: https://github.com/yushiang-demo/PanoToMesh/compare/v2.1.1...v2.1.2
[2.1.1]: https://github.com/yushiang-demo/PanoToMesh/compare/v2.1.0...v2.1.1
[2.1.0]: https://github.com/yushiang-demo/PanoToMesh/compare/v2.0.1...v2.1.0
[2.0.1]: https://github.com/yushiang-demo/PanoToMesh/compare/v2.0.0...v2.0.1
[2.0.0]: https://github.com/yushiang-demo/PanoToMesh/compare/v1.4.1...v2.0.0
Expand Down
4 changes: 3 additions & 1 deletion apps/editors/decoration/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const Editor = ({ data }) => {
}, []);

useEffect(() => {
threeRef.current.cameraControls.setEnable(mode === MODE.SELECT);
threeRef.current?.cameraControls.setEnable(mode === MODE.SELECT);
}, [mode]);

const focusedMedia = media[focusedIndex];
Expand Down Expand Up @@ -153,6 +153,8 @@ const Editor = ({ data }) => {
[focusedIndex]
);

if (!panorama) return null;

return (
<>
<ThreeCanvas dev={dev} ref={threeRef} {...eventHandlers}>
Expand Down
2 changes: 2 additions & 0 deletions apps/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ const Viewer = ({ data }) => {
);
});

if (!panorama) return null;

return (
<>
<ThreeCanvas dev={dev} ref={threeRef} {...eventsHandlers}>
Expand Down

0 comments on commit d9ea085

Please sign in to comment.