Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / contextual / js / views / RegionView.js
1 /**
2 * DO NOT EDIT THIS FILE.
3 * See the following change record for more information,
4 * https://www.drupal.org/node/2815083
5 * @preserve
6 **/
7
8 (function (Drupal, Backbone, Modernizr) {
9   Drupal.contextual.RegionView = Backbone.View.extend({
10     events: function events() {
11       var mapping = {
12         mouseenter: function mouseenter() {
13           this.model.set('regionIsHovered', true);
14         },
15         mouseleave: function mouseleave() {
16           this.model.close().blur().set('regionIsHovered', false);
17         }
18       };
19
20       if (Modernizr.touchevents) {
21         mapping = {};
22       }
23       return mapping;
24     },
25     initialize: function initialize() {
26       this.listenTo(this.model, 'change:hasFocus', this.render);
27     },
28     render: function render() {
29       this.$el.toggleClass('focus', this.model.get('hasFocus'));
30
31       return this;
32     }
33   });
34 })(Drupal, Backbone, Modernizr);