locked
semantic zoom: changing the order of the zoomed in and zoomed out views crashes the app?

    Question

  • Hello guys.

    Can I change the order between the views defined inside the semanticzoom control? I've noticed that if I set the zoomed in view before the zoomed out, everything works out great. however, if I reverse the order, then clicking over one of the entries that should make me go into the zoomed in view no longer works and scrolling the wheel ends up generating an exception.

    This was a working sample I've written during developer preview and at the time it did work, so I'm assuming that it changed from dev to consumer preview and if no one must always defined the zoomed in view before the zoomed out view.

    btw, I've noticed there's a zoomedOut property, but setting it up from code will result in an exception (it does work when it's set from the markup):

    app.onactivated = function (eventObject) {
            if (eventObject.detail.kind === Windows.ApplicationModel.Activation.ActivationKind.launch) {
                WinJS.UI.processAll()
                    .then(function () {
                        document.getElementById("semanticZoom").winControl.zoomedOut = true;
                    });
            }
        };

    any ideas on what I'm doing wrong?

    thanks.


    Luis Abreu


    Thursday, May 31, 2012 12:46 PM

Answers

  • Hi Luis,

    I took the RP semantic zoom sample and modified scenario2.js and this works fine:

    (function () {
        "use strict";
        var page = WinJS.UI.Pages.define("/html/scenario2.html", {
            ready: function (element, options) {
                WinJS.UI.processAll(element);
                document.getElementById("semanticZoomDiv").winControl.zoomedOut = true;
            }
        });
    })();


    Jeff Sanders (MSFT)

    Friday, June 01, 2012 6:09 PM
    Moderator

All replies

  • Hi Luis,

    You may have to start with the Zoomed in view but I am still looking at this!

    -Jeff


    Jeff Sanders (MSFT)

    Friday, June 01, 2012 3:11 PM
    Moderator
  • Hi Luis,

    I took the RP semantic zoom sample and modified scenario2.js and this works fine:

    (function () {
        "use strict";
        var page = WinJS.UI.Pages.define("/html/scenario2.html", {
            ready: function (element, options) {
                WinJS.UI.processAll(element);
                document.getElementById("semanticZoomDiv").winControl.zoomedOut = true;
            }
        });
    })();


    Jeff Sanders (MSFT)

    Friday, June 01, 2012 6:09 PM
    Moderator
  • Yep, it's working fine in the RP (notice that I posted it while using Consumer preview)...

    thanks again.


    Luis Abreu

    Monday, June 04, 2012 12:35 PM
  • Exellent!

    Jeff Sanders (MSFT)

    Monday, June 04, 2012 12:44 PM
    Moderator