Skip to content

Commit 9978518

Browse files
committed
added condition for wrappers
1 parent 7937858 commit 9978518

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

dist/angular-nvd3.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**************************************************************************
2-
* AngularJS-nvD3, v0.0.9; MIT License; 07/24/2014 11:07
2+
* AngularJS-nvD3, v0.0.9; MIT License; 07/24/2014 12:59
33
* http://krispo.github.io/angular-nvd3
44
**************************************************************************/
55
(function(){
@@ -118,12 +118,13 @@
118118
scope.api.updateWithData(scope.data);
119119

120120
// Configure wrappers
121-
configureWrapper('title');
122-
configureWrapper('subtitle');
123-
configureWrapper('caption');
121+
if (options['title'] || scope._config.extended) configureWrapper('title');
122+
if (options['subtitle'] || scope._config.extended) configureWrapper('subtitle');
123+
if (options['caption'] || scope._config.extended) configureWrapper('caption');
124+
124125

125126
// Configure styles
126-
configureStyles();
127+
if (options['styles'] || scope._config.extended) configureStyles();
127128

128129
nv.addGraph(function() {
129130
// Update the chart when window resizes

dist/angular-nvd3.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/angular-nvd3.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,13 @@
114114
scope.api.updateWithData(scope.data);
115115

116116
// Configure wrappers
117-
configureWrapper('title');
118-
configureWrapper('subtitle');
119-
configureWrapper('caption');
117+
if (options['title'] || scope._config.extended) configureWrapper('title');
118+
if (options['subtitle'] || scope._config.extended) configureWrapper('subtitle');
119+
if (options['caption'] || scope._config.extended) configureWrapper('caption');
120+
120121

121122
// Configure styles
122-
configureStyles();
123+
if (options['styles'] || scope._config.extended) configureStyles();
123124

124125
nv.addGraph(function() {
125126
// Update the chart when window resizes

0 commit comments

Comments
 (0)