annotate web/timeline/TimeZoomed.coffee @ 2439:06da5db2fafe

rewrite ascoltami to use the graph for more playback data
author drewp@bigasterisk.com
date Thu, 30 May 2024 01:08:07 -0700
parents 4556eebe5d73
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2062
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
1 log = debug('timeline')
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
2 debug.enable('*')
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
3
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
4 Drawing = window.Drawing
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
5 ROW_COUNT = 7
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
6
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
7
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
8 # plan: in here, turn all the notes into simple js objects with all
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
9 # their timing data and whatever's needed for adjusters. From that, do
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
10 # the brick layout. update only changing adjusters.
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
11 @customElement('light9-timeline-time-zoomed')
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
12 class TimeZoomed extends LitElement
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
13 @getter_properties:
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
14 graph: { type: Object, notify: true }
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
15 project: { type: Object }
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
16 selection: { type: Object, notify: true }
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
17 song: { type: String, notify: true }
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
18 viewState: { type: Object, notify: true }
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
19 inlineAttrConfigs: { type: Array, value: [] } # only for inlineattrs that should be displayed
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
20 imageSamples: { type: Array, value: [] }
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
21 @getter_observers: [
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
22 '_onGraph(graph, setAdjuster, song, viewState, project)',
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
23 'onZoom(viewState)',
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
24 '_onViewState(viewState)',
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
25 ]
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
26 constructor: ->
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
27 super()
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
28 @numRows = 6
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
29 @noteByUriStr = new Map()
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
30 @stage = new PIXI.Container()
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
31 @stage.interactive=true
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
32
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
33 @renderer = PIXI.autoDetectRenderer({
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
34 backgroundColor: 0x606060,
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
35 antialias: true,
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
36 forceCanvas: true,
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
37 })
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
38 @bg = new PIXI.Container()
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
39 @stage.addChild(@bg)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
40
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
41 @dirty = _.debounce(@_repaint.bind(@), 10)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
42
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
43 ready: ->
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
44 super.ready()
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
45
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
46 @imageSamples = ['one']
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
47
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
48 @addEventListener('iron-resize', @_onResize.bind(@))
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
49 Polymer.RenderStatus.afterNextRender(this, @_onResize.bind(@))
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
50
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
51 @$.rows.appendChild(@renderer.view)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
52
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
53 # This works for display, but pixi hit events didn't correctly
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
54 # move with the objects, so as a workaround, I extended the top of
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
55 # the canvas in _onResize.
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
56 #
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
57 #ko.computed =>
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
58 # @stage.setTransform(0, -(@viewState.rowsY()), 1, 1, 0, 0, 0, 0, 0)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
59
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
60 _onResize: ->
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
61 @$.rows.firstChild.style.position = 'relative'
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
62 @$.rows.firstChild.style.top = -@viewState.rowsY() + 'px'
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
63
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
64 @renderer.resize(@clientWidth, @clientHeight + @viewState.rowsY())
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
65
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
66 @dirty()
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
67
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
68 _onGraph: (graph, setAdjuster, song, viewState, project)->
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
69 return unless @song # polymer will call again
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
70 @graph.runHandler(@gatherNotes.bind(@), 'zoom notes')
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
71
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
72 _onViewState: (viewState) ->
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
73 @brickLayout = new BrickLayout(@viewState, @numRows)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
74
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
75 noteDirty: -> @dirty()
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
76
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
77 onZoom: ->
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
78 updateZoomFlattened = ->
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
79 @zoomFlattened = ko.toJS(@viewState.zoomSpec)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
80 ko.computed(updateZoomFlattened.bind(@))
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
81
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
82 gatherNotes: ->
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
83 U = (x) => @graph.Uri(x)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
84 return unless @song?
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
85 songNotes = @graph.objects(U(@song), U(':note'))
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
86
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
87 toRemove = new Set(@noteByUriStr.keys())
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
88
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
89 for uri in @graph.sortedUris(songNotes)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
90 had = toRemove.delete(uri.value)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
91 if not had
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
92 @_addNote(uri)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
93
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
94 toRemove.forEach @_delNote.bind(@)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
95
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
96 @dirty()
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
97
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
98 isActiveNote: (note) -> @noteByUriStr.has(note.value)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
99
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
100 _repaint: ->
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
101 @_drawGrid()
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
102 @renderer.render(@stage)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
103
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
104 _drawGrid: ->
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
105 # maybe someday this has snappable timing markers too
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
106 @bg.removeChildren()
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
107 gfx = new PIXI.Graphics()
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
108 @bg.addChild(gfx)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
109
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
110 gfx.lineStyle(1, 0x222222, 1)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
111 for row in [0...@numRows]
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
112 y = @brickLayout.rowBottom(row)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
113 gfx.moveTo(0, y)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
114 gfx.lineTo(@clientWidth, y)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
115
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
116 _addNote: (uri) ->
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
117 U = (x) => @graph.Uri(x)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
118
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
119 con = new PIXI.Container()
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
120 con.interactive=true
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
121 @stage.addChild(con)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
122
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
123 note = new Note(@, con, @project, @graph, @selection, uri, @setAdjuster, U(@song), @viewState, @brickLayout)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
124 # this must come before the first Note.draw
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
125 @noteByUriStr.set(uri.value, note)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
126 @brickLayout.addNote(note, note.onRowChange.bind(note))
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
127 note.initWatchers()
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
128
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
129 _delNote: (uriStr) ->
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
130 n = @noteByUriStr.get(uriStr)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
131 @brickLayout.delNote(n)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
132 @stage.removeChild(n.container)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
133 n.destroy()
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
134 @noteByUriStr.delete(uriStr)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
135
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
136 onDrop: (effect, pos) ->
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
137 U = (x) => @graph.Uri(x)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
138
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
139 return unless effect and effect.match(/^http/)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
140
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
141 # we could probably accept some initial overrides right on the
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
142 # effect uri, maybe as query params
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
143
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
144 if not @graph.contains(effect, U('rdf:type'), U(':Effect'))
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
145 if @graph.contains(effect, U('rdf:type'), U(':LightSample'))
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
146 effect = @project.makeEffect(effect)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
147 else
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
148 log("drop #{effect} is not an effect")
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
149 return
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
150
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
151 dropTime = @viewState.zoomInX.invert(pos.e(1))
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
152
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
153 desiredWidthX = @offsetWidth * .3
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
154 desiredWidthT = @viewState.zoomInX.invert(desiredWidthX) - @viewState.zoomInX.invert(0)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
155 desiredWidthT = Math.min(desiredWidthT, @viewState.zoomSpec.duration() - dropTime)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
156 @project.makeNewNote(U(@song), U(effect), dropTime, desiredWidthT)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
157
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
158 updateInlineAttrs: (note, config) ->
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
159 if not config?
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
160 index = 0
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
161 for c in @inlineAttrConfigs
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
162 if c.uri.equals(note)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
163 @splice('inlineAttrConfigs', index)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
164 return
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
165 index += 1
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
166 else
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
167 index = 0
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
168 for c in @inlineAttrConfigs
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
169 if c.uri.equals(note)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
170 @splice('inlineAttrConfigs', index, 1, config)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
171 return
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
172 index += 1
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
173 @push('inlineAttrConfigs', config)
d991f7c3485a WIP rough porting of coffee to ts
drewp@bigasterisk.com
parents:
diff changeset
174