diff --git a/components/ionBody/ionBody.js b/components/ionBody/ionBody.js index bc3982a..17dec9b 100644 --- a/components/ionBody/ionBody.js +++ b/components/ionBody/ionBody.js @@ -39,7 +39,19 @@ Template.ionBody.helpers({ } }); +Template.ionBody.rendered = function () { + window.addEventListener('statusTap', function() { + $('.content.overflow-scroll').animate({ + scrollTop: 0 + }, 500); + }); +}; + Template.ionBody.events({ + 'statusTap': function () { + console.log('ionBody.statusTap'); + }, + 'click [data-ion-modal]': function (event, template) { var templateName = $(event.currentTarget).data('ion-modal'); IonModal.open(templateName, $(event.currentTarget).data()); @@ -90,4 +102,4 @@ Template.ionBody.events({ 'mouseup .button, touchend .button': function (event, template) { $(event.target).removeClass('active'); } -}); \ No newline at end of file +}); diff --git a/components/ionItem/ionItem.js b/components/ionItem/ionItem.js index d0eb6b1..031622b 100644 --- a/components/ionItem/ionItem.js +++ b/components/ionItem/ionItem.js @@ -57,7 +57,7 @@ Template.ionItem.helpers({ hash.hash = this.hash; hash.data = this.data; var options = new Spacebars.kw(hash); - + // Devs may pass 'route=x' instead of 'path=' or 'url=' // Should doing that throw an error? Not sure but we decided to // parse it as if the dev passed it as 'path=' diff --git a/components/ionNavView/ionNavView.js b/components/ionNavView/ionNavView.js index a969321..8ee55ba 100644 --- a/components/ionNavView/ionNavView.js +++ b/components/ionNavView/ionNavView.js @@ -20,7 +20,7 @@ Template.ionNavView.created = function () { if (this.transition === 'ios') { this.transitionDuration = 450; } else { - this.transitionDuration = 200; + this.transitionDuration = 320; } }; @@ -38,17 +38,18 @@ Template.ionNavView.rendered = function () { $node.insertBefore(next).addClass('nav-view-entering nav-view-stage'); Meteor.setTimeout(function() { $node.removeClass('nav-view-stage').addClass('nav-view-active'); - }, 16); + }, 0); Meteor.setTimeout(function () { $(this).removeClass('nav-view-entering'); $('[data-nav-container]').removeClass('nav-view-direction-back').addClass('nav-view-direction-forward'); - }, template.transitionDuration + 16); + }, template.transitionDuration); }, removeElement: function(node) { var $node = $(node); if (!template.transition || !$node.hasClass('view') || IonNavigation.skipTransitions) { + console.log('removing node w/o animating…'); $node.remove(); return; } @@ -56,12 +57,12 @@ Template.ionNavView.rendered = function () { $node.addClass('nav-view-leaving nav-view-stage'); Meteor.setTimeout(function() { $node.removeClass('nav-view-stage').addClass('nav-view-active'); - }, 16); + }, 0); Meteor.setTimeout(function () { $node.remove(); Session.set('ionNavDirection', 'forward'); - }, template.transitionDuration + 16); + }, template.transitionDuration); } }; };