MCPcopy Create free account
hub / github.com/cryptii/cryptii / _createPipePart

Method _createPipePart

src/View/Pipe.js:199–214  ·  view source on GitHub ↗

* Creates pipe part. * @param {number} index * @return {HTMLElement}

(index)

Source from the content-addressed store, hash-verified

197 * @return {HTMLElement}
198 */
199 _createPipePart (index) {
200 return View.createElement('button', {
201 className: 'pipe__part-pipe',
202 onClick: evt => {
203 this.getModel().viewAddButtonDidClick(this, index)
204 evt.preventDefault()
205 }
206 }, [
207 View.createElement('div', {
208 className: 'pipe__btn-add'
209 }, 'Add encoder or viewer'),
210 View.createElement('div', {
211 className: 'pipe__drop-handle'
212 })
213 ])
214 }
215
216 /**
217 * Creates brick part.

Callers 1

updateMethod · 0.95

Calls 3

createElementMethod · 0.80
viewAddButtonDidClickMethod · 0.80
getModelMethod · 0.45

Tested by

no test coverage detected