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(
8 /** @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);
24 .set('regionIsHovered', false);
27 // We don't want mouse hover events on touch.
28 if (Modernizr.touchevents) {
35 * Renders the visual view of a contextual region element.
39 * @augments Backbone.View
42 this.listenTo(this.model, 'change:hasFocus', this.render);
48 * @return {Drupal.contextual.RegionView}
49 * The current contextual region view.
52 this.$el.toggleClass('focus', this.model.get('hasFocus'));
58 })(Drupal, Backbone, Modernizr);