blob: 83d51958c6181c9a806a13893bd87215e8dc98ef [file] [log] [blame]
Steven Burrows9edc7e02016-08-29 11:52:07 +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/*
18 ONOS GUI -- Topology Select Module.
19 */
20
21(function () {
22 'use strict';
23
24 // internal state
25 var hovered, selections, selectOrder, consumeClick;
26
27 function selectObject(obj) {
28 var el = this,
29 nodeEv = el && el.tagName === 'g',
30 ev = d3.event.sourceEvent || {},
31 n;
32
33 console.log(el, nodeEv, ev, n);
34 }
35
36 function clickConsumed(x) {
37 var cc = consumeClick;
38 consumeClick = !!x;
39 return cc;
40 }
41
42 angular.module('ovTopo2')
43 .factory('Topo2SelectService',
44 [
45 function () {
46
47 return {
48 selectObject: selectObject,
49 clickConsumed: clickConsumed
50 };
51 }
52 ]);
53
54})();