This repository was archived by the owner on Jul 29, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
lib/timeline/component/item Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -261,6 +261,13 @@ <h3 id="items">Items</h3>
261
261
< a href ="#Styles "> Styles</ a > .
262
262
</ td >
263
263
</ tr >
264
+ < tr >
265
+ < td > align</ td >
266
+ < td > String</ td >
267
+ < td > no</ td >
268
+ < td > This field is optional. If set this overrides the global < code > align</ code > configuration option for this item.
269
+ </ td >
270
+ </ tr >
264
271
< tr >
265
272
< td > content</ td >
266
273
< td > String</ td >
Original file line number Diff line number Diff line change @@ -171,6 +171,7 @@ RangeItem.prototype.repositionX = function(limitSize) {
171
171
var parentWidth = this . parent . width ;
172
172
var start = this . conversion . toScreen ( this . data . start ) ;
173
173
var end = this . conversion . toScreen ( this . data . end ) ;
174
+ var align = this . data . align === undefined ? this . options . align : this . data . align ;
174
175
var contentStartPosition ;
175
176
var contentWidth ;
176
177
@@ -217,7 +218,7 @@ RangeItem.prototype.repositionX = function(limitSize) {
217
218
}
218
219
this . dom . box . style . width = boxWidth + 'px' ;
219
220
220
- switch ( this . options . align ) {
221
+ switch ( align ) {
221
222
case 'left' :
222
223
if ( this . options . rtl ) {
223
224
this . dom . content . style . right = '0' ;
You can’t perform that action at this time.
0 commit comments