Sha256: 97b709fed3fdb0390561a42d1593f4e3ae6efe358ef4c1a46b3592cebe6cbe71
Contents?: true
Size: 1.31 KB
Versions: 71
Compression:
Stored size: 1.31 KB
Contents
define ["frank"], (frank)-> ErsatzModel = Backbone.Model.extend default: highlightFrames = [] initialize: -> @refreshBaseScreenshot() highlightSomeFramesForABit: (frames)-> @set('highlightFrames',frames) @temporaryHighlightTimeout = window.setTimeout( => @set('highlightFrames',[]) @temporaryHighlightTimeout = undefined , 1500 ) resetViews: (views,deviceFamily,orientation)-> @set('allViews',views) @set('deviceFamily',deviceFamily) @set('orientation',orientation) @set('highlightFrames',[]) @configureAllViews(views) refreshBaseScreenshot: -> @set('baseScreenshotUrl',frank.baseScreenshotUrl()) toggleAsploded: -> isAsploded = !(@get('isAsploded')) @set('isAsploded',isAsploded) if isAsploded @updateAsplodedViews() isAsploded updateAsplodedViews: ()-> frank.requestSnapshotRefresh().done => @trigger('snapshots-refreshed',@) configureAllViews: (allViews)-> allViews.on 'change:active', (subject,isActive)=> window.clearTimeout(@temporaryHighlightTimeout) if @temporaryHighlightTimeout? if isActive && !@get('isAsploded') @set('highlightFrames',[subject.get('accessibilityFrame')]) else @set('highlightFrames',[])
Version data entries
71 entries across 54 versions & 5 rubygems