// Generated by github.com/steida/coffee2closure 0.1.12 goog.provide('spark.components.Overlay'); goog.require('spark.core.View'); /** Overlay view of Spark Framework. @constructor @export @param {Object=} options Class options. @param {*=} data Class data @extends {spark.core.View} */ spark.components.Overlay = function(options, data) { var _ref; if (options == null) { options = {}; } if (options.blocking == null) { options.blocking = (_ref = options['blocking']) != null ? _ref : true; } options.renderTo || (options.renderTo = options['renderTo'] || document.body); this.getCssClass(options, 'overlay'); spark.components.Overlay.superClass_.constructor.call(this, options, data); if (!options.blocking) { this.setRemovable(); } } goog.inherits(spark.components.Overlay, spark.core.View); /** Binds click handler to overlay element to remove it once clicked. @export */ spark.components.Overlay.prototype.setRemovable = function() { return this.on('click', (function(_this) { return function() { return _this.destroy(); }; })(this)); };