@@ -49,8 +49,8 @@ Item {
4949 property alias highlightIndex: listView.highlightIndex
5050 /// The column count is required for API compatibility with FilterGrids
5151 readonly property int columns: listView.count
52− /// Indicates that this component automatically centers the highlighted item
53− readonly property bool highlightCentered: true
52+ /// exposes the delegate of the currentItem
53+ readonly property alias currentItem: listView.currentItem
5454
5555 /// Emitted when the user clicked on an item
5656 /// @param index is the index of the clicked item
@@ -147,13 +147,9 @@ Item {
147147 flickDeceleration: Math.max(1500 * Math.pow(realWidth / referenceWidth, 1.5), 1500) // 1500 is platform default
148148 maximumFlickVelocity: Math.max(2500 * Math.pow(realWidth / referenceWidth, 1.5), 2500) // 2500 is platform default
149149 orientation: ListView.Horizontal
150− currentIndex: highlightIndex
151− highlightFollowsCurrentItem: true
152− preferredHighlightBegin: (width - tileWidth) * 0.5
153− preferredHighlightEnd: (width - tileWidth) * 0.5
154− highlightRangeMode: highlightIndex != -1 ? ListView.StrictlyEnforceRange : ListView.NoHighlightRange
155150
156151 function itemClicked(index, delegateItem) {
152+ listView.currentIndex = index
157153 var x = CarouselJS.getXFromContinuousIndex(index,
158154 realWidth,
159155 realContentWidth,
@@ -201,6 +197,12 @@ Item {
201197 newContentXAnimation.start();
202198 }
203199
200+ onHighlightIndexChanged: {
201+ if (highlightIndex != -1) {
202+ itemClicked(highlightIndex)
203+ }
204+ }
205+
204206 onMovementStarted: {
205207 stepAnimation.stop()
206208 newContentXAnimation.stop()
@@ -284,6 +286,9 @@ Item {
284286 itemTranslationScale,
285287 listView.maximumItemTranslation)
286288
289+ readonly property real xTransform: listView.viewTranslation + translationX * listView.scaleFactor
290+ readonly property real center: x - listView.contentX + xTransform - drawBuffer + (width/2)
291+
287292 width: listView.tileWidth
288293 height: listView.tileHeight
289294 scale: itemScale * explicitScaleFactor
@@ -292,7 +297,7 @@ Item {
292297 opacity: highlightIndex == -1 ? 1 : (highlightIndex == index ? 0.6 : 0.2)
293298
294299 transform: Translate {
295− x: listView.viewTranslation + translationX * listView.scaleFactor
300+ x: xTransform
296301 }
297302
298303 Behavior on explicitScaleFactor {