File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
src/service/PlotBase/SvgLoader/element Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import Point from '../../../PlotUtilBase/Geometry/Point';
44 * @Author : zk
55 * @Date : 2021-11-16 11:04:30
66 * @LastEditors : zk
7- * @LastEditTime : 2022-05-23 13:37:11
7+ * @LastEditTime : 2022-05-24 16:33:39
88 */
99export default class DimModal {
1010 constructor ( element ) {
@@ -41,9 +41,8 @@ export default class DimModal {
4141 get ( i ) {
4242 const oLen = this . translatePoints . length ;
4343 const lLen = this . lineAngles . length ;
44-
45-
46- if ( i >= oLen || i >= lLen ) {
44+ let fIndex = i
45+ if ( oLen === 0 || 0 === lLen ) {
4746 return undefined
4847 }
4948
@@ -66,9 +65,13 @@ export default class DimModal {
6665 } ) ;
6766 }
6867
68+ if ( lLen === 1 || oLen === 1 ) {
69+ fIndex = 0
70+ }
71+
6972 return {
70- originPnt : this . translatePnts [ i ] ,
71- lineAngle : this . lineAngles [ i ]
73+ originPnt : this . translatePnts [ fIndex ] ,
74+ lineAngle : this . lineAngles [ fIndex ]
7275 } ;
7376 }
7477}
You can’t perform that action at this time.
0 commit comments