Committed by
Gerrit Code Review
GUI -- Removed dependence on jQuery -- it turns out that angular implements extend().
Change-Id: I0cca98975873aa6fa1bf8258a2bedbc508d3c7d7
Showing
6 changed files
with
7 additions
and
8 deletions
... | @@ -130,7 +130,7 @@ | ... | @@ -130,7 +130,7 @@ |
130 | // converts given TopoJSON-format data into corresponding GeoJSON | 130 | // converts given TopoJSON-format data into corresponding GeoJSON |
131 | // data, and creates a path generator for that data. | 131 | // data, and creates a path generator for that data. |
132 | function createPathGenerator(topoData, opts) { | 132 | function createPathGenerator(topoData, opts) { |
133 | - var settings = $.extend({}, defaultGenSettings, opts), | 133 | + var settings = angular.extend({}, defaultGenSettings, opts), |
134 | topoObject = topoData.objects[settings.objectTag], | 134 | topoObject = topoData.objects[settings.objectTag], |
135 | geoData = topojson.feature(topoData, topoObject), | 135 | geoData = topojson.feature(topoData, topoObject), |
136 | proj = settings.projection, | 136 | proj = settings.projection, | ... | ... |
... | @@ -60,7 +60,7 @@ | ... | @@ -60,7 +60,7 @@ |
60 | function createZoomer(opts) { | 60 | function createZoomer(opts) { |
61 | var cz = 'ZoomService.createZoomer(): ', | 61 | var cz = 'ZoomService.createZoomer(): ', |
62 | d3s = ' (D3 selection) property defined', | 62 | d3s = ' (D3 selection) property defined', |
63 | - settings = $.extend({}, defaultSettings, opts), | 63 | + settings = angular.extend({}, defaultSettings, opts), |
64 | zoom = d3.behavior.zoom() | 64 | zoom = d3.behavior.zoom() |
65 | .translate([0, 0]) | 65 | .translate([0, 0]) |
66 | .scale(1) | 66 | .scale(1) | ... | ... |
... | @@ -21,11 +21,12 @@ | ... | @@ -21,11 +21,12 @@ |
21 | 'use strict'; | 21 | 'use strict'; |
22 | 22 | ||
23 | function isF(f) { | 23 | function isF(f) { |
24 | - return $.isFunction(f) ? f : null; | 24 | + return typeof f === 'function' ? f : null; |
25 | } | 25 | } |
26 | 26 | ||
27 | function isA(a) { | 27 | function isA(a) { |
28 | - return $.isArray(a) ? a : null; | 28 | + // NOTE: Array.isArray() is part of EMCAScript 5.1 |
29 | + return Array.isArray(a) ? a : null; | ||
29 | } | 30 | } |
30 | 31 | ||
31 | function isS(s) { | 32 | function isS(s) { |
... | @@ -33,7 +34,7 @@ | ... | @@ -33,7 +34,7 @@ |
33 | } | 34 | } |
34 | 35 | ||
35 | function isO(o) { | 36 | function isO(o) { |
36 | - return $.isPlainObject(o) ? o : null; | 37 | + return (o && typeof o === 'object' && o.constructor === Object) ? o : null; |
37 | } | 38 | } |
38 | 39 | ||
39 | function contains(a, x) { | 40 | function contains(a, x) { | ... | ... |
... | @@ -92,7 +92,7 @@ | ... | @@ -92,7 +92,7 @@ |
92 | } | 92 | } |
93 | 93 | ||
94 | function setupGlobalKeys() { | 94 | function setupGlobalKeys() { |
95 | - $.extend(keyHandler, { | 95 | + angular.extend(keyHandler, { |
96 | globalKeys: { | 96 | globalKeys: { |
97 | backSlash: [quickHelp, 'Show / hide Quick Help'], | 97 | backSlash: [quickHelp, 'Show / hide Quick Help'], |
98 | slash: [quickHelp, 'Show / hide Quick Help'], | 98 | slash: [quickHelp, 'Show / hide Quick Help'], | ... | ... |
... | @@ -27,7 +27,6 @@ | ... | @@ -27,7 +27,6 @@ |
27 | 27 | ||
28 | <script src="../tp/d3.js"></script> | 28 | <script src="../tp/d3.js"></script> |
29 | <script src="../tp/topojson.v1.min.js"></script> | 29 | <script src="../tp/topojson.v1.min.js"></script> |
30 | - <script src="../tp/jquery-2.1.1.min.js"></script> | ||
31 | 30 | ||
32 | <!-- ONOS UI Framework included here --> | 31 | <!-- ONOS UI Framework included here --> |
33 | <!-- TODO: use a single catenated-minified file here --> | 32 | <!-- TODO: use a single catenated-minified file here --> | ... | ... |
... | @@ -21,7 +21,6 @@ module.exports = function(config) { | ... | @@ -21,7 +21,6 @@ module.exports = function(config) { |
21 | '../tp/angular-route.js', | 21 | '../tp/angular-route.js', |
22 | '../tp/d3.js', | 22 | '../tp/d3.js', |
23 | '../tp/topojson.v1.min.js', | 23 | '../tp/topojson.v1.min.js', |
24 | - '../tp/jquery-2.1.1.min.js', | ||
25 | 24 | ||
26 | // production code... | 25 | // production code... |
27 | // make sure modules are defined first... | 26 | // make sure modules are defined first... | ... | ... |
-
Please register or login to post a comment