I've looked in the forum for similar problem, but didn't get what I was looking for, that's why I create that question.
I've created a custom semantic zoom widget, implementing the WinJS ZoomableView interface.
The container that is zoomed is not a pure list or a grid, but contains several floated DIV elements and a list. When an group from the zoomed-in view is clicked, then I calculate the left offset and manually scroll the container, in order to focus on the
selected group. This code is implemented inside the "positionItem" method. It works fine on a Surface, but from time to time on a desktop the "positionItem"
and the preceding "beginZoom" are not called. And in such cases, when it goes from zoomed-in to zoomed-out view the container is not scrolled.
getPanAxis: function () {
return "horizontal";
},
beginZoom: function () {
},
positionItem: function (item, position) {
var currentItem = document.activeElement;
var currentID = currentItem.children.item(0).title.toLowerCase();
var currentOffset = this._calculateOffset(currentID);
document.querySelector(".semanticZoomContainer > div > div > div").scrollLeft = currentOffset;
},
endZoom: function (isCurrentView, setFocus) {
}
I've tried to use the parameters of the "positionItem" method, but with no success. I thought that having not implemented "getCurrentItem" method, this means that "positionItem" is not also called. But this is not absolutely true,
because the "beginZoom" is not also called, which precedes any other. So it's seems I've implemented something wrong and I'll be glad if somebody can help me. The other option is that there is a bug in WinJS Semantic Zoom, but I don't think so.
Thank you in advance for the help.
Best regards,
Nikolay Alipiev