@@ -60,6 +60,10 @@ export default class IgcTileComponent extends EventEmitterMixin<
6060
6161 private static readonly increment = createCounter ( ) ;
6262 private _dragController : TileDragAndDropController ;
63+ private _colSpan = 1 ;
64+ private _rowSpan = 1 ;
65+ private _colStart : number | null = null ;
66+ private _rowStart : number | null = null ;
6367 private _position = - 1 ;
6468 private _disableDrag = false ;
6569 private _fullscreen = false ;
@@ -83,16 +87,84 @@ export default class IgcTileComponent extends EventEmitterMixin<
8387 public tileId : string | null = null ;
8488
8589 @property ( { type : Number } )
86- public colSpan = 1 ; // review
90+ public set colSpan ( value : number ) {
91+ const oldValue = this . _colSpan ;
92+
93+ if ( value <= 0 ) {
94+ this . _colSpan = 1 ;
95+ } else {
96+ this . _colSpan = value ;
97+ }
98+
99+ if ( oldValue !== this . _colSpan ) {
100+ this . style . setProperty ( '--ig-col-span' , `${ value } ` ) ;
101+ this . requestUpdate ( 'colSpan' , oldValue ) ;
102+ }
103+ }
104+
105+ public get colSpan ( ) : number {
106+ return this . _colSpan ;
107+ }
87108
88109 @property ( { type : Number } )
89- public rowSpan = 1 ; // review
110+ public set rowSpan ( value : number ) {
111+ const oldValue = this . _rowSpan ;
112+
113+ if ( value <= 0 ) {
114+ this . _rowSpan = 1 ;
115+ } else {
116+ this . _rowSpan = value ;
117+ }
118+
119+ if ( oldValue !== this . _rowSpan ) {
120+ this . style . setProperty ( '--ig-row-span' , `${ value } ` ) ;
121+ this . requestUpdate ( 'rowSpan' , oldValue ) ;
122+ }
123+ }
124+
125+ public get rowSpan ( ) : number {
126+ return this . _rowSpan ;
127+ }
90128
91129 @property ( { type : Number } )
92- public colStart : number | null = null ;
130+ public set colStart ( value : number ) {
131+ const oldValue = this . _colStart ;
132+
133+ if ( value <= 0 ) {
134+ this . _colStart = null ;
135+ } else {
136+ this . _colStart = value ;
137+ }
138+
139+ if ( oldValue !== this . _colStart ) {
140+ this . style . setProperty ( '--ig-col-start' , `${ value } ` ) ;
141+ this . requestUpdate ( 'colStart' , oldValue ) ;
142+ }
143+ }
144+
145+ public get colStart ( ) : number | null {
146+ return this . _colStart ;
147+ }
93148
94149 @property ( { type : Number } )
95- public rowStart : number | null = null ;
150+ public set rowStart ( value : number ) {
151+ const oldValue = this . _rowStart ;
152+
153+ if ( value <= 0 ) {
154+ this . _rowStart = null ;
155+ } else {
156+ this . _rowStart = value ;
157+ }
158+
159+ if ( oldValue !== this . _rowStart ) {
160+ this . style . setProperty ( '--ig-row-start' , `${ value } ` ) ;
161+ this . requestUpdate ( 'rowStart' , oldValue ) ;
162+ }
163+ }
164+
165+ public get rowStart ( ) : number | null {
166+ return this . _rowStart ;
167+ }
96168
97169 @property ( { type : Boolean , reflect : true } )
98170 public set fullscreen ( value : boolean ) {
0 commit comments