Steven Burrows | 57e24e9 | 2016-08-04 18:38:24 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016-present Open Networking Laboratory |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | /* |
| 18 | ONOS GUI -- Topology Links Module. |
| 19 | Module that holds the links for a region |
| 20 | */ |
| 21 | |
| 22 | (function () { |
| 23 | 'use strict'; |
| 24 | |
Steven Burrows | 86af435 | 2016-11-16 18:19:12 -0600 | [diff] [blame] | 25 | var $log, Collection, Model, ts, sus, t2zs, t2vs, t2lps, fn; |
Steven Burrows | 9edc7e0 | 2016-08-29 11:52:07 +0100 | [diff] [blame] | 26 | |
| 27 | var linkLabelOffset = '0.35em'; |
Steven Burrows | 57e24e9 | 2016-08-04 18:38:24 +0100 | [diff] [blame] | 28 | |
Steven Burrows | ec1f45c | 2016-08-08 16:14:41 +0100 | [diff] [blame] | 29 | var widthRatio = 1.4, |
| 30 | linkScale = d3.scale.linear() |
| 31 | .domain([1, 12]) |
| 32 | .range([widthRatio, 12 * widthRatio]) |
| 33 | .clamp(true), |
Steven Burrows | 583f4be | 2016-11-04 14:06:50 +0100 | [diff] [blame] | 34 | allLinkTypes = 'direct optical tunnel UiDeviceLink', |
| 35 | allLinkSubTypes = 'not-permitted', |
Steven Burrows | a3fca81 | 2016-10-14 15:11:04 -0500 | [diff] [blame] | 36 | labelDim = 30; |
Steven Burrows | ec1f45c | 2016-08-08 16:14:41 +0100 | [diff] [blame] | 37 | |
| 38 | // configuration |
| 39 | var linkConfig = { |
| 40 | light: { |
| 41 | baseColor: '#939598', |
| 42 | inColor: '#66f', |
| 43 | outColor: '#f00' |
| 44 | }, |
| 45 | dark: { |
| 46 | // TODO : theme |
| 47 | baseColor: '#939598', |
| 48 | inColor: '#66f', |
| 49 | outColor: '#f00' |
| 50 | }, |
| 51 | inWidth: 12, |
| 52 | outWidth: 10 |
| 53 | }; |
| 54 | |
Steven Burrows | ec1f45c | 2016-08-08 16:14:41 +0100 | [diff] [blame] | 55 | function createLink() { |
| 56 | |
| 57 | var linkPoints = this.linkEndPoints(this.get('epA'), this.get('epB')); |
Steven Burrows | ec1f45c | 2016-08-08 16:14:41 +0100 | [diff] [blame] | 58 | |
| 59 | var attrs = angular.extend({}, linkPoints, { |
| 60 | key: this.get('id'), |
| 61 | class: 'link', |
Steven Burrows | ec1f45c | 2016-08-08 16:14:41 +0100 | [diff] [blame] | 62 | position: { |
| 63 | x1: 0, |
| 64 | y1: 0, |
| 65 | x2: 0, |
| 66 | y2: 0 |
| 67 | } |
| 68 | // functions to aggregate dual link state |
Steven Burrows | 9edc7e0 | 2016-08-29 11:52:07 +0100 | [diff] [blame] | 69 | // extra: link.extra |
Steven Burrows | ec1f45c | 2016-08-08 16:14:41 +0100 | [diff] [blame] | 70 | }); |
| 71 | |
| 72 | this.set(attrs); |
| 73 | } |
| 74 | |
Steven Burrows | 9edc7e0 | 2016-08-29 11:52:07 +0100 | [diff] [blame] | 75 | function rectAroundText(el) { |
| 76 | var text = el.select('text'), |
| 77 | box = text.node().getBBox(); |
| 78 | |
| 79 | // translate the bbox so that it is centered on [x,y] |
| 80 | box.x = -box.width / 2; |
| 81 | box.y = -box.height / 2; |
| 82 | |
| 83 | // add padding |
| 84 | box.x -= 4; |
| 85 | box.width += 8; |
| 86 | return box; |
| 87 | } |
| 88 | |
Steven Burrows | dfa52b0 | 2016-09-02 13:50:43 +0100 | [diff] [blame] | 89 | function isLinkOnline(node) { |
| 90 | return (node.get('nodeType') === 'region') ? true : node.get('online'); |
| 91 | } |
| 92 | |
Steven Burrows | ec1f45c | 2016-08-08 16:14:41 +0100 | [diff] [blame] | 93 | function linkEndPoints(srcId, dstId) { |
| 94 | |
Steven Burrows | af96a21 | 2016-12-28 12:57:02 +0000 | [diff] [blame] | 95 | var findNodeById = this.region.model.findNodeById.bind(this.region), |
| 96 | allNodes = this.region.model.nodes(), |
| 97 | sourceNode = findNodeById(this, srcId), |
| 98 | targetNode = findNodeById(this, dstId); |
Steven Burrows | ec1f45c | 2016-08-08 16:14:41 +0100 | [diff] [blame] | 99 | |
Steven Burrows | 6deb4ce | 2016-08-26 16:06:23 +0100 | [diff] [blame] | 100 | if (!sourceNode || !targetNode) { |
Steven Burrows | 8f45ce2 | 2016-10-27 20:04:14 -0500 | [diff] [blame] | 101 | $log.error('Node(s) not on map for link:' + srcId + '~' + dstId); |
Steven Burrows | dfa52b0 | 2016-09-02 13:50:43 +0100 | [diff] [blame] | 102 | // logicError('Node(s) not on map for link:\n' + sMiss + dMiss); |
Steven Burrows | 6deb4ce | 2016-08-26 16:06:23 +0100 | [diff] [blame] | 103 | return null; |
| 104 | } |
Steven Burrows | ec1f45c | 2016-08-08 16:14:41 +0100 | [diff] [blame] | 105 | |
Steven Burrows | a3fca81 | 2016-10-14 15:11:04 -0500 | [diff] [blame] | 106 | this.source = allNodes.indexOf(sourceNode); |
| 107 | this.target = allNodes.indexOf(targetNode); |
| 108 | this.sourceNode = sourceNode; |
| 109 | this.targetNode = targetNode; |
Steven Burrows | ec1f45c | 2016-08-08 16:14:41 +0100 | [diff] [blame] | 110 | |
| 111 | return { |
| 112 | source: sourceNode, |
| 113 | target: targetNode |
| 114 | }; |
| 115 | } |
| 116 | |
| 117 | function createLinkCollection(data, _region) { |
| 118 | |
| 119 | var LinkModel = Model.extend({ |
| 120 | region: _region, |
| 121 | createLink: createLink, |
| 122 | linkEndPoints: linkEndPoints, |
| 123 | type: function () { |
| 124 | return this.get('type'); |
| 125 | }, |
Steven Burrows | 86af435 | 2016-11-16 18:19:12 -0600 | [diff] [blame] | 126 | svgClassName: function () { |
| 127 | return fn.classNames('link', |
| 128 | this.nodeType, |
| 129 | this.get('type'), |
| 130 | { |
| 131 | enhanced: this.get('enhanced'), |
| 132 | selected: this.get('selected') |
| 133 | } |
| 134 | ); |
| 135 | }, |
Steven Burrows | ec1f45c | 2016-08-08 16:14:41 +0100 | [diff] [blame] | 136 | expected: function () { |
Steven Burrows | 9edc7e0 | 2016-08-29 11:52:07 +0100 | [diff] [blame] | 137 | // TODO: original code is: (s && s.expected) && (t && t.expected); |
Steven Burrows | ec1f45c | 2016-08-08 16:14:41 +0100 | [diff] [blame] | 138 | return true; |
| 139 | }, |
| 140 | online: function () { |
Steven Burrows | 9edc7e0 | 2016-08-29 11:52:07 +0100 | [diff] [blame] | 141 | |
Steven Burrows | dfa52b0 | 2016-09-02 13:50:43 +0100 | [diff] [blame] | 142 | var source = this.get('source'), |
| 143 | target = this.get('target'), |
| 144 | sourceOnline = isLinkOnline(source), |
| 145 | targetOnline = isLinkOnline(target); |
| 146 | |
| 147 | return (sourceOnline) && (targetOnline); |
Steven Burrows | ec1f45c | 2016-08-08 16:14:41 +0100 | [diff] [blame] | 148 | }, |
Steven Burrows | 86af435 | 2016-11-16 18:19:12 -0600 | [diff] [blame] | 149 | onChange: function () { |
| 150 | // Update class names when the model changes |
| 151 | if (this.el) { |
| 152 | this.el.attr('class', this.svgClassName()); |
| 153 | } |
| 154 | }, |
Steven Burrows | 9edc7e0 | 2016-08-29 11:52:07 +0100 | [diff] [blame] | 155 | enhance: function () { |
| 156 | var data = [], |
| 157 | point; |
| 158 | |
Steven Burrows | 1c5c861 | 2016-10-05 13:45:13 -0500 | [diff] [blame] | 159 | if (showPort()) { |
Steven Burrows | af96a21 | 2016-12-28 12:57:02 +0000 | [diff] [blame] | 160 | this.set('enhanced', true); |
Steven Burrows | 1c5c861 | 2016-10-05 13:45:13 -0500 | [diff] [blame] | 161 | point = this.locatePortLabel(); |
Steven Burrows | dfa52b0 | 2016-09-02 13:50:43 +0100 | [diff] [blame] | 162 | angular.extend(point, { |
Simon Hunt | 95f4b42 | 2017-03-03 13:49:05 -0800 | [diff] [blame] | 163 | id: 'topo2-port-tgt', |
Steven Burrows | 1c5c861 | 2016-10-05 13:45:13 -0500 | [diff] [blame] | 164 | num: this.get('portB') |
Steven Burrows | dfa52b0 | 2016-09-02 13:50:43 +0100 | [diff] [blame] | 165 | }); |
| 166 | data.push(point); |
Steven Burrows | 1c5c861 | 2016-10-05 13:45:13 -0500 | [diff] [blame] | 167 | |
| 168 | if (this.get('portA')) { |
| 169 | point = this.locatePortLabel(1); |
| 170 | angular.extend(point, { |
Simon Hunt | 95f4b42 | 2017-03-03 13:49:05 -0800 | [diff] [blame] | 171 | id: 'topo2-port-src', |
Steven Burrows | 1c5c861 | 2016-10-05 13:45:13 -0500 | [diff] [blame] | 172 | num: this.get('portA') |
| 173 | }); |
| 174 | data.push(point); |
| 175 | } |
| 176 | |
Simon Hunt | 95f4b42 | 2017-03-03 13:49:05 -0800 | [diff] [blame] | 177 | var entering = d3.select('#topo2-portLabels') |
Steven Burrows | 1c5c861 | 2016-10-05 13:45:13 -0500 | [diff] [blame] | 178 | .selectAll('.portLabel') |
Steven Burrows | a3fca81 | 2016-10-14 15:11:04 -0500 | [diff] [blame] | 179 | .data(data) |
| 180 | .enter().append('g') |
Steven Burrows | 1c5c861 | 2016-10-05 13:45:13 -0500 | [diff] [blame] | 181 | .classed('portLabel', true) |
Steven Burrows | af96a21 | 2016-12-28 12:57:02 +0000 | [diff] [blame] | 182 | .attr('id', function (d) { return d.id; }); |
Steven Burrows | 1c5c861 | 2016-10-05 13:45:13 -0500 | [diff] [blame] | 183 | |
| 184 | entering.each(function (d) { |
| 185 | var el = d3.select(this), |
| 186 | rect = el.append('rect'), |
| 187 | text = el.append('text').text(d.num); |
| 188 | |
| 189 | var rectSize = rectAroundText(el); |
| 190 | |
| 191 | rect.attr(rectSize) |
| 192 | .attr('rx', 2) |
| 193 | .attr('ry', 2); |
| 194 | |
| 195 | text.attr('dy', linkLabelOffset) |
| 196 | .attr('text-anchor', 'middle'); |
| 197 | |
| 198 | el.attr('transform', sus.translate(d.x, d.y)); |
Steven Burrows | a3fca81 | 2016-10-14 15:11:04 -0500 | [diff] [blame] | 199 | |
Steven Burrows | 1c5c861 | 2016-10-05 13:45:13 -0500 | [diff] [blame] | 200 | }); |
Steven Burrows | a3fca81 | 2016-10-14 15:11:04 -0500 | [diff] [blame] | 201 | |
| 202 | this.setScale(); |
Steven Burrows | dfa52b0 | 2016-09-02 13:50:43 +0100 | [diff] [blame] | 203 | } |
Steven Burrows | 9edc7e0 | 2016-08-29 11:52:07 +0100 | [diff] [blame] | 204 | }, |
| 205 | unenhance: function () { |
Steven Burrows | 86af435 | 2016-11-16 18:19:12 -0600 | [diff] [blame] | 206 | this.set('enhanced', false); |
Simon Hunt | 95f4b42 | 2017-03-03 13:49:05 -0800 | [diff] [blame] | 207 | d3.select('#topo2-portLabels').selectAll('.portLabel').remove(); |
Steven Burrows | 9edc7e0 | 2016-08-29 11:52:07 +0100 | [diff] [blame] | 208 | }, |
Steven Burrows | 1aa4f58 | 2016-12-13 15:05:41 -0500 | [diff] [blame] | 209 | getSelected: function () { |
| 210 | return this.collection.filter(function (m) { |
| 211 | return m.get('selected'); |
| 212 | }); |
| 213 | }, |
Steven Burrows | 86af435 | 2016-11-16 18:19:12 -0600 | [diff] [blame] | 214 | select: function () { |
Steven Burrows | 1aa4f58 | 2016-12-13 15:05:41 -0500 | [diff] [blame] | 215 | |
Steven Burrows | 86af435 | 2016-11-16 18:19:12 -0600 | [diff] [blame] | 216 | // TODO: if single selection clear selected devices, hosts, sub-regions |
| 217 | var s = Boolean(this.get('selected')); |
| 218 | // Clear all selected Items |
| 219 | _.each(this.collection.models, function (m) { |
| 220 | m.set('selected', false); |
| 221 | }); |
| 222 | |
| 223 | this.set('selected', !s); |
Steven Burrows | 1aa4f58 | 2016-12-13 15:05:41 -0500 | [diff] [blame] | 224 | this.showDetails(); |
Steven Burrows | 86af435 | 2016-11-16 18:19:12 -0600 | [diff] [blame] | 225 | |
Steven Burrows | 1aa4f58 | 2016-12-13 15:05:41 -0500 | [diff] [blame] | 226 | return this.getSelected(); |
| 227 | }, |
| 228 | deselect: function () { |
| 229 | this.set('selected', false); |
| 230 | this.set('enhanced', false); |
Steven Burrows | 86af435 | 2016-11-16 18:19:12 -0600 | [diff] [blame] | 231 | }, |
| 232 | showDetails: function () { |
Steven Burrows | 1aa4f58 | 2016-12-13 15:05:41 -0500 | [diff] [blame] | 233 | var selected = this.getSelected(); |
Steven Burrows | 86af435 | 2016-11-16 18:19:12 -0600 | [diff] [blame] | 234 | |
| 235 | if (selected) { |
| 236 | t2lps.displayLink(this); |
| 237 | } else { |
| 238 | t2lps.hide(); |
| 239 | } |
| 240 | }, |
Steven Burrows | dfa52b0 | 2016-09-02 13:50:43 +0100 | [diff] [blame] | 241 | locatePortLabel: function (src) { |
Steven Burrows | a3fca81 | 2016-10-14 15:11:04 -0500 | [diff] [blame] | 242 | |
| 243 | var offset = 32 / (labelDim * t2zs.scale()), |
| 244 | sourceX = this.get('position').x1, |
| 245 | sourceY = this.get('position').y1, |
| 246 | targetX = this.get('position').x2, |
| 247 | targetY = this.get('position').y2, |
| 248 | nearX = src ? sourceX : targetX, |
| 249 | nearY = src ? sourceY : targetY, |
| 250 | farX = src ? targetX : sourceX, |
| 251 | farY = src ? targetY : sourceY; |
Steven Burrows | 9edc7e0 | 2016-08-29 11:52:07 +0100 | [diff] [blame] | 252 | |
Steven Burrows | dfa52b0 | 2016-09-02 13:50:43 +0100 | [diff] [blame] | 253 | function dist(x, y) { |
| 254 | return Math.sqrt(x * x + y * y); |
| 255 | } |
Steven Burrows | 9edc7e0 | 2016-08-29 11:52:07 +0100 | [diff] [blame] | 256 | |
| 257 | var dx = farX - nearX, |
| 258 | dy = farY - nearY, |
Steven Burrows | a3fca81 | 2016-10-14 15:11:04 -0500 | [diff] [blame] | 259 | k = (32 * offset) / dist(dx, dy); |
Steven Burrows | 9edc7e0 | 2016-08-29 11:52:07 +0100 | [diff] [blame] | 260 | |
Steven Burrows | dfa52b0 | 2016-09-02 13:50:43 +0100 | [diff] [blame] | 261 | return { x: k * dx + nearX, y: k * dy + nearY }; |
Steven Burrows | 9edc7e0 | 2016-08-29 11:52:07 +0100 | [diff] [blame] | 262 | }, |
Steven Burrows | ec1f45c | 2016-08-08 16:14:41 +0100 | [diff] [blame] | 263 | restyleLinkElement: function (immediate) { |
| 264 | // this fn's job is to look at raw links and decide what svg classes |
| 265 | // need to be applied to the line element in the DOM |
| 266 | var th = ts.theme(), |
| 267 | el = this.el, |
| 268 | type = this.get('type'), |
Steven Burrows | ec1f45c | 2016-08-08 16:14:41 +0100 | [diff] [blame] | 269 | online = this.online(), |
Steven Burrows | 583f4be | 2016-11-04 14:06:50 +0100 | [diff] [blame] | 270 | modeCls = this.expected() ? '-inactive' : 'not-permitted', |
Steven Burrows | ec1f45c | 2016-08-08 16:14:41 +0100 | [diff] [blame] | 271 | delay = immediate ? 0 : 1000; |
| 272 | |
Steven Burrows | ec1f45c | 2016-08-08 16:14:41 +0100 | [diff] [blame] | 273 | // NOTE: understand why el is sometimes undefined on addLink events... |
| 274 | // Investigated: |
| 275 | // el is undefined when it's a reverse link that is being added. |
| 276 | // updateLinks (which sets ldata.el) isn't called before this is called. |
| 277 | // Calling _updateLinks in addLinkUpdate fixes it, but there might be |
| 278 | // a more efficient way to fix it. |
| 279 | if (el && !el.empty()) { |
| 280 | el.classed('link', true); |
| 281 | el.classed(allLinkSubTypes, false); |
| 282 | el.classed(modeCls, !online); |
| 283 | el.classed(allLinkTypes, false); |
| 284 | if (type) { |
| 285 | el.classed(type, true); |
| 286 | } |
| 287 | el.transition() |
| 288 | .duration(delay) |
Steven Burrows | ec1f45c | 2016-08-08 16:14:41 +0100 | [diff] [blame] | 289 | .attr('stroke', linkConfig[th].baseColor); |
Steven Burrows | a3fca81 | 2016-10-14 15:11:04 -0500 | [diff] [blame] | 290 | |
| 291 | this.setScale(); |
Steven Burrows | ec1f45c | 2016-08-08 16:14:41 +0100 | [diff] [blame] | 292 | } |
| 293 | }, |
Steven Burrows | ec1f45c | 2016-08-08 16:14:41 +0100 | [diff] [blame] | 294 | onEnter: function (el) { |
Steven Burrows | dfa52b0 | 2016-09-02 13:50:43 +0100 | [diff] [blame] | 295 | var link = d3.select(el); |
Steven Burrows | 9edc7e0 | 2016-08-29 11:52:07 +0100 | [diff] [blame] | 296 | |
Steven Burrows | ec1f45c | 2016-08-08 16:14:41 +0100 | [diff] [blame] | 297 | this.el = link; |
Steven Burrows | ec1f45c | 2016-08-08 16:14:41 +0100 | [diff] [blame] | 298 | this.restyleLinkElement(); |
| 299 | |
| 300 | if (this.get('type') === 'hostLink') { |
Steven Burrows | dfa52b0 | 2016-09-02 13:50:43 +0100 | [diff] [blame] | 301 | // sus.visible(link, api.showHosts()); |
Steven Burrows | ec1f45c | 2016-08-08 16:14:41 +0100 | [diff] [blame] | 302 | } |
Steven Burrows | 0616e80 | 2016-10-06 21:45:07 -0500 | [diff] [blame] | 303 | }, |
| 304 | setScale: function () { |
Steven Burrows | a3fca81 | 2016-10-14 15:11:04 -0500 | [diff] [blame] | 305 | var width = linkScale(widthRatio) / t2zs.scale(); |
Steven Burrows | 0616e80 | 2016-10-06 21:45:07 -0500 | [diff] [blame] | 306 | this.el.style('stroke-width', width + 'px'); |
Steven Burrows | a3fca81 | 2016-10-14 15:11:04 -0500 | [diff] [blame] | 307 | |
| 308 | var labelScale = labelDim / (labelDim * t2zs.scale()); |
| 309 | |
Simon Hunt | 95f4b42 | 2017-03-03 13:49:05 -0800 | [diff] [blame] | 310 | d3.select('#topo2-portLabels') |
Steven Burrows | a3fca81 | 2016-10-14 15:11:04 -0500 | [diff] [blame] | 311 | .selectAll('.portLabel') |
| 312 | .selectAll('*') |
| 313 | .style('transform', 'scale(' + labelScale + ')'); |
| 314 | |
Steven Burrows | 1c5c861 | 2016-10-05 13:45:13 -0500 | [diff] [blame] | 315 | }, |
| 316 | update: function () { |
Steven Burrows | 86af435 | 2016-11-16 18:19:12 -0600 | [diff] [blame] | 317 | if (this.get('enhanced')) { |
Steven Burrows | 1c5c861 | 2016-10-05 13:45:13 -0500 | [diff] [blame] | 318 | this.enhance(); |
| 319 | } |
Steven Burrows | b15a394 | 2017-01-17 17:25:04 +0000 | [diff] [blame] | 320 | }, |
| 321 | remove: function () { |
| 322 | |
| 323 | var width = linkScale(widthRatio) / t2zs.scale(); |
| 324 | |
| 325 | this.el.transition() |
| 326 | .duration(300) |
| 327 | .attr('stroke', '#ff0000') |
| 328 | .style('stroke-width', width * 4) |
| 329 | .transition() |
| 330 | .delay(1000) |
| 331 | .style('opacity', 0); |
Steven Burrows | ec1f45c | 2016-08-08 16:14:41 +0100 | [diff] [blame] | 332 | } |
| 333 | }); |
Steven Burrows | 57e24e9 | 2016-08-04 18:38:24 +0100 | [diff] [blame] | 334 | |
| 335 | var LinkCollection = Collection.extend({ |
Steven Burrows | dfa52b0 | 2016-09-02 13:50:43 +0100 | [diff] [blame] | 336 | model: LinkModel |
Steven Burrows | 57e24e9 | 2016-08-04 18:38:24 +0100 | [diff] [blame] | 337 | }); |
| 338 | |
| 339 | return new LinkCollection(data); |
| 340 | } |
| 341 | |
Steven Burrows | 1c5c861 | 2016-10-05 13:45:13 -0500 | [diff] [blame] | 342 | function showPort() { |
| 343 | return t2vs.getPortHighlighting(); |
| 344 | } |
| 345 | |
Steven Burrows | 57e24e9 | 2016-08-04 18:38:24 +0100 | [diff] [blame] | 346 | angular.module('ovTopo2') |
Steven Burrows | af96a21 | 2016-12-28 12:57:02 +0000 | [diff] [blame] | 347 | .factory('Topo2LinkService', [ |
| 348 | '$log', 'Topo2Collection', 'Topo2Model', |
Steven Burrows | 0616e80 | 2016-10-06 21:45:07 -0500 | [diff] [blame] | 349 | 'ThemeService', 'SvgUtilService', 'Topo2ZoomService', |
Steven Burrows | 86af435 | 2016-11-16 18:19:12 -0600 | [diff] [blame] | 350 | 'Topo2ViewService', 'Topo2LinkPanelService', 'FnService', |
Steven Burrows | af96a21 | 2016-12-28 12:57:02 +0000 | [diff] [blame] | 351 | function (_$log_, _c_, _Model_, _ts_, _sus_, |
| 352 | _t2zs_, _t2vs_, _t2lps_, _fn_) { |
Steven Burrows | 57e24e9 | 2016-08-04 18:38:24 +0100 | [diff] [blame] | 353 | |
Steven Burrows | af96a21 | 2016-12-28 12:57:02 +0000 | [diff] [blame] | 354 | $log = _$log_; |
| 355 | ts = _ts_; |
| 356 | sus = _sus_; |
| 357 | t2zs = _t2zs_; |
| 358 | t2vs = _t2vs_; |
| 359 | Collection = _c_; |
| 360 | Model = _Model_; |
| 361 | t2lps = _t2lps_; |
| 362 | fn = _fn_; |
Steven Burrows | 57e24e9 | 2016-08-04 18:38:24 +0100 | [diff] [blame] | 363 | |
Steven Burrows | af96a21 | 2016-12-28 12:57:02 +0000 | [diff] [blame] | 364 | return { |
| 365 | createLinkCollection: createLinkCollection |
| 366 | }; |
| 367 | } |
| 368 | ]); |
Steven Burrows | 57e24e9 | 2016-08-04 18:38:24 +0100 | [diff] [blame] | 369 | })(); |