3 * A Backbone View that renders the visual view of a contextual region element.
6 (function (Drupal, Backbone, Modernizr) {
7 Drupal.contextual.RegionView = Backbone.View.extend(/** @lends Drupal.contextual.RegionView# */{
10 * Events for the Backbone view.
13 * A mapping of events to be used in the view.
18 this.model.set('regionIsHovered', true);
21 this.model.close().blur().set('regionIsHovered', false);
24 // We don't want mouse hover events on touch.
25 if (Modernizr.touchevents) {
32 * Renders the visual view of a contextual region element.
36 * @augments Backbone.View
39 this.listenTo(this.model, 'change:hasFocus', this.render);
45 * @return {Drupal.contextual.RegionView}
46 * The current contextual region view.
49 this.$el.toggleClass('focus', this.model.get('hasFocus'));
55 }(Drupal, Backbone, Modernizr));