@@ -16,18 +16,18 @@ export class Triangle extends Polygon {
16
16
*/
17
17
public constructor ( ...args : any [ ] ) {
18
18
if ( args . length === 0 ) {
19
- super ( GeometryType . POLYGON , false , false ) ;
19
+ super ( GeometryType . TRIANGLE , false , false ) ;
20
20
} else if ( args . length === 1 && args [ 0 ] instanceof Triangle ) {
21
- super ( GeometryType . POLYGON , args [ 0 ] . hasZ , args [ 0 ] . hasM ) ;
21
+ super ( GeometryType . TRIANGLE , args [ 0 ] . hasZ , args [ 0 ] . hasM ) ;
22
22
args [ 0 ] . rings . forEach ( ring => this . addRing ( ring . copy ( ) as LineString ) ) ;
23
23
} else if ( args . length === 1 && args [ 0 ] instanceof LineString ) {
24
- super ( GeometryType . POLYGON , args [ 0 ] . hasZ , args [ 0 ] . hasM ) ;
24
+ super ( GeometryType . TRIANGLE , args [ 0 ] . hasZ , args [ 0 ] . hasM ) ;
25
25
this . addRing ( args [ 0 ] ) ;
26
26
} else if ( args . length === 1 && args [ 0 ] . length != null ) {
27
- super ( GeometryType . POLYGON , args [ 0 ] . hasZ , args [ 0 ] . hasM ) ;
27
+ super ( GeometryType . TRIANGLE , args [ 0 ] . hasZ , args [ 0 ] . hasM ) ;
28
28
this . rings = ( args [ 0 ] as Array < LineString > )
29
29
} else if ( args . length === 2 ) {
30
- super ( GeometryType . POLYGON , args [ 0 ] , args [ 1 ] ) ;
30
+ super ( GeometryType . TRIANGLE , args [ 0 ] , args [ 1 ] ) ;
31
31
} else if ( args . length === 3 ) {
32
32
super ( args [ 0 ] , args [ 1 ] , args [ 2 ] ) ;
33
33
}
0 commit comments