(function(){var e,t;App.Views.DrawerView=Backbone.View.extend({className:"swipablePanel swipeX",initialize:function(){this.$el.addClass("swipeX");var e=this;this.listenTo(app.Models.MainLayoutModel,"change:orientation",function(t){showDebug===2&&console.log("UPDATE_UI_ORENTATION: "+t.changed.orientation),e.$el.addClass("swipablePanel"),t.changed.orientation!="portrait"&&$("#viewport").hasClass("drawer")&&this.trigger("UPDATE_MAIN_VIEW",{scenario:""})}),this.updatePanelLimits()},render:function(){},updatePanelLimits:function(){e=[Math.floor($(window).width()*.85*-1),Math.floor($(window).width()*.85)]},getLimits:function(){return e},getState:function(){var e=this.$el.css("transform");return $("#viewport").hasClass("drawer")?t=!0:t=!1,t},swipePanel:function(t,n,r,i){r=="swiperight"||r=="swipeleft"?(e[0]<e[1]&&(t-=this.$el.width()*.85),n?($(this.$el).addClass("animate"),$(this.$el).css("transform","")):($(this.$el).removeClass("animate"),$(this.$el).css("transform","translate3d("+t+"px,0,0)")),(e[0]<e[1]&&r=="swipeleft"||e[0]>e[1]&&r=="swiperight")&&this.trigger("UPDATE_MAIN_VIEW",{scenario:"drawer"})):r=="none"&&i&&this.trigger("UPDATE_MAIN_VIEW",{scenario:"drawer"})}})})();