File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
packages/lb-components/src
components/pointCloudView Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -380,6 +380,15 @@ const PointCloudTopView: React.FC<IProps> = ({
380380 ptCtx . topViewInstance ?. toolInstance ,
381381 ] ) ;
382382
383+ useEffect ( ( ) => {
384+ if ( ! ptCtx . topViewInstance ) return ;
385+
386+ const defaultAttribute = config ?. attributeList ?. [ 0 ] ?. value ;
387+ if ( defaultAttribute ) {
388+ ptCtx . topViewInstance . toolInstance . setDefaultAttribute ( defaultAttribute ) ;
389+ }
390+ } , [ ptCtx . topViewInstance ] ) ;
391+
383392 useEffect ( ( ) => {
384393 if ( ! size ?. width || ! ptCtx . topViewInstance ) {
385394 return ;
@@ -389,11 +398,6 @@ const PointCloudTopView: React.FC<IProps> = ({
389398 *
390399 * 1. Update defaultAttribute by first attribute;
391400 * */
392- const defaultAttribute = config ?. attributeList ?. [ 0 ] ?. value ;
393- if ( defaultAttribute ) {
394- ptCtx . topViewInstance . toolInstance . setDefaultAttribute ( defaultAttribute ) ;
395- }
396-
397401 // 1. Update Size
398402 ptCtx . topViewInstance . initSize ( size ) ;
399403 ptCtx . topViewInstance . updatePolygonList ( ptCtx . displayPointCloudList , ptCtx . polygonList ) ;
Original file line number Diff line number Diff line change @@ -1664,7 +1664,7 @@ $headerHeight: 40px;
16641664 }
16651665 }
16661666 .#{$ptPrefix } -container__left-large {
1667- width : 455 px ;
1667+ width : 100 % ;
16681668 }
16691669 .#{$ptPrefix } -container__left-noLarge {
16701670 width : 100% ;
You can’t perform that action at this time.
0 commit comments