Sha256: 187229a235b2ece0af21b1c336165e7a99bd147e57aff22a0c3d13f82bd812df
Contents?: true
Size: 1.99 KB
Versions: 15
Compression:
Stored size: 1.99 KB
Contents
(function() { define(["frank"], function(frank) { var ErsatzModel, highlightFrames; return ErsatzModel = Backbone.Model.extend({ "default": highlightFrames = [], initialize: function() { return this.refreshBaseScreenshot(); }, highlightSomeFramesForABit: function(frames) { var _this = this; this.set('highlightFrames', frames); return this.temporaryHighlightTimeout = window.setTimeout(function() { _this.set('highlightFrames', []); return _this.temporaryHighlightTimeout = void 0; }, 1500); }, resetViews: function(views, deviceFamily, orientation) { this.set('allViews', views); this.set('deviceFamily', deviceFamily); this.set('orientation', orientation); this.set('highlightFrames', []); return this.configureAllViews(views); }, refreshBaseScreenshot: function() { return this.set('baseScreenshotUrl', frank.baseScreenshotUrl()); }, toggleAsploded: function() { var isAsploded; isAsploded = !(this.get('isAsploded')); this.set('isAsploded', isAsploded); if (isAsploded) { this.updateAsplodedViews(); } return isAsploded; }, updateAsplodedViews: function() { var _this = this; return frank.requestSnapshotRefresh().done(function() { return _this.trigger('snapshots-refreshed', _this); }); }, configureAllViews: function(allViews) { var _this = this; return allViews.on('change:active', function(subject, isActive) { if (_this.temporaryHighlightTimeout != null) { window.clearTimeout(_this.temporaryHighlightTimeout); } if (isActive && !_this.get('isAsploded')) { return _this.set('highlightFrames', [subject.get('accessibilityFrame')]); } else { return _this.set('highlightFrames', []); } }); } }); }); }).call(this);
Version data entries
15 entries across 15 versions & 1 rubygems