@@ -12,6 +12,7 @@ import {SeatItemCircle} from "./seat-item.circle";
1212import { CoordinateModel } from "../../../../../models/coordinate.model" ;
1313import { SeatItemTitle } from "./seat-item.title" ;
1414import { SeatAction } from "../../../../../enums/global" ;
15+ import { SeatItemCheck } from "./seat-item.check" ;
1516
1617
1718@dom ( {
@@ -24,6 +25,7 @@ export class SeatItem extends SvgBase {
2425 public circle : SeatItemCircle ;
2526 public title : SeatItemTitle ;
2627 public coordinates : CoordinateModel ;
28+ public check : SeatItemCheck ;
2729
2830 constructor ( public parent : Seats , public item : SeatModel ) {
2931 super ( parent ) ;
@@ -34,7 +36,7 @@ export class SeatItem extends SvgBase {
3436
3537 public setColor ( color : string , animation : boolean = false ) : this {
3638 if ( animation ) {
37- this . circle . node . interrupt ( ) . transition ( ) . duration ( this . global . config . animation_speed ) . attr ( "fill" , color ) ;
39+ this . circle . node . transition ( ) . duration ( this . global . config . animation_speed ) . attr ( "fill" , color ) ;
3840 } else {
3941 this . circle . node . attr ( "fill" , color ) ;
4042 }
@@ -51,13 +53,15 @@ export class SeatItem extends SvgBase {
5153 this . item . selected = true ;
5254 this . node . classed ( "selected" , true ) ;
5355 this . circle . node . attr ( "fill" , this . global . config . seat_style . selected ) ;
56+ this . check . show ( ) ;
5457 return this ;
5558 }
5659
5760 public unSelect ( ) : this {
5861 this . item . selected = false ;
5962 this . node . classed ( "selected" , false ) ;
6063 this . circle . node . attr ( "fill" , this . global . config . seat_style . color ) ;
64+ this . check . hide ( ) ;
6165 return this ;
6266 }
6367
@@ -127,6 +131,10 @@ export class SeatItem extends SvgBase {
127131 this . addChild ( this . circle ) ;
128132
129133
134+ this . check = new SeatItemCheck ( this ) . addTo ( this ) ;
135+
136+
137+
130138 // this.title = new SeatItemTitle(this);
131139 // this.addChild(this.title);
132140
0 commit comments