Ghost/ghost/admin/app/components/gh-nav-menu.js
Kevin Ansfield 909e038e63 Better flickering auto-nav fix
refs #5652
- reverts previous fix (#5698) to return translate3d smoothness
- add separate open-autonav toggle element and style it to always stick to the viewport edge to avoid wandering hover hit areas
2015-09-02 17:41:50 +01:00

34 lines
692 B
JavaScript

import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'nav',
classNames: ['gh-nav'],
classNameBindings: ['open'],
config: Ember.inject.service(),
open: false,
mouseEnter: function () {
this.sendAction('onMouseEnter');
},
actions: {
toggleAutoNav: function () {
this.sendAction('toggleMaximise');
},
openModal: function (modal) {
this.sendAction('openModal', modal);
},
closeMobileMenu: function () {
this.sendAction('closeMobileMenu');
},
openAutoNav: function () {
this.sendAction('openAutoNav');
}
}
});