blob: 932101ca608e8a12d0c9db249a9bf85f8e671e55 [file] [log] [blame]
Steven Burrowsec1f45c2016-08-08 16:14:41 +01001/*
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/*
18ONOS GUI -- Topology Layout Module.
19Module that contains the d3.force.layout logic
20*/
21
22(function () {
23 'use strict';
24
Steven Burrows6deb4ce2016-08-26 16:06:23 +010025 function nodeEnter(node) {
26 node.onEnter(this, node);
Steven Burrowsec1f45c2016-08-08 16:14:41 +010027 }
28
Steven Burrowsdfa52b02016-09-02 13:50:43 +010029 function nodeExit(node) {
30 node.onExit(this, node);
31 }
32
Steven Burrowsbeef9352016-10-21 14:09:50 -050033 function hostEnter(node) {
34 node.onEnter(this, node);
Steven Burrowsec1f45c2016-08-08 16:14:41 +010035 }
36
37 function linkEntering(link) {
38 link.onEnter(this);
39 }
40
41 angular.module('ovTopo2')
Steven Burrowsaf96a212016-12-28 12:57:02 +000042 .factory('Topo2D3Service', [
43
44 function (_is_) {
45 return {
46 nodeEnter: nodeEnter,
47 nodeExit: nodeExit,
48 hostEnter: hostEnter,
49 linkEntering: linkEntering
50 };
51 }
52 ]
Steven Burrowsec1f45c2016-08-08 16:14:41 +010053);
54})();