blob: ffb7f86dc45c774407ca0f40bc866f7246e51b36 [file] [log] [blame]
Steven Burrowse7cc3082016-09-27 11:24:58 -07001/*
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 Layout Module.
19 Module that contains the d3.force.layout logic
20 */
21
22(function () {
23 'use strict';
24
25 // Injected refs
26 var $log;
27
28 // Internal State
29 var proj;
30
31 function projection(x) {
32 if (x) {
33 proj = x;
34 $log.debug("Set the projection");
35 }
36 return proj;
37 }
38
39 angular.module('ovTopo2')
40 .factory('Topo2MapConfigService',
41 ['$log',
42 function (_$log_) {
43
44 $log = _$log_;
45
46 return {
47 projection: projection
48 };
49 }
50 ]
51 );
52})();