Skip to content

Commit 9c5ac74

Browse files
committed
Version 1.8.1
1 parent bd6716c commit 9c5ac74

File tree

7 files changed

+55
-20
lines changed

7 files changed

+55
-20
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngmap",
3-
"version": "1.8.0",
3+
"version": "1.8.1",
44
"main": "./build/scripts/ng-map.js",
55
"homepage": "https://github.com/allenhwkim/angularjs-google-maps",
66
"authors": [

build/docs/directives_map.js.html

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ <h1 class="page-title">Source: directives/map.js</h1>
4646
* The center of map incase geolocation failed. i.e. [0,0]
4747
* @param {Boolean} zoom-to-include-markers
4848
* When true, map boundary will be changed automatially to include all markers when initialized
49+
* @param {Boolean} default-style
50+
* When false, the default styling, `display:block;height:300px`, will be ignored.
4951
* @param {String} init-event The name of event to initialize this map.
5052
* If this option is given, the map won't be initialized until the event is received.
5153
* To invoke the event, use $scope.$emit or $scope.$broacast.
@@ -109,11 +111,13 @@ <h1 class="page-title">Source: directives/map.js</h1>
109111
/**
110112
* if style is not given to the map element, set display and height
111113
*/
112-
if (getStyle(element[0], 'display') != "block") {
113-
element.css('display','block');
114-
}
115-
if (getStyle(element[0], 'height').match(/^(0|auto)/)) {
116-
element.css('height','300px');
114+
if (attrs.defaultStyle !== 'false') {
115+
if (getStyle(element[0], 'display') != "block") {
116+
element.css('display','block');
117+
}
118+
if (getStyle(element[0], 'height').match(/^(0|auto)/)) {
119+
element.css('height','300px');
120+
}
117121
}
118122

119123
/**

build/docs/map.html

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,29 @@ <h5>Attributes:</h5>
157157

158158

159159

160+
<tr>
161+
162+
<td class="name"><code>default-style</code></td>
163+
164+
165+
<td class="type">
166+
167+
168+
<span class="param-type">Boolean</span>
169+
170+
171+
172+
</td>
173+
174+
175+
176+
177+
178+
<td class="description last"><p>When false, the default styling, <code>display:block;height:300px</code>, will be ignored.</p></td>
179+
</tr>
180+
181+
182+
160183
<tr>
161184

162185
<td class="name"><code>init-event</code></td>
@@ -340,7 +363,7 @@ <h3 class="subsection-title">Methods</h3>
340363
<dt>
341364

342365

343-
<a href="directives_map.js.html#line68" class="name-link"><h4 class="name" id=".linkFunc">linkFunc<span class="signature">(scope, element, attrs)</span><span class="type-signature"></span></h4></a>
366+
<a href="directives_map.js.html#line70" class="name-link"><h4 class="name" id=".linkFunc">linkFunc<span class="signature">(scope, element, attrs)</span><span class="type-signature"></span></h4></a>
344367

345368

346369

@@ -477,7 +500,7 @@ <h5>Parameters:</h5>
477500
<!-- commented out by Allen Kim
478501
<dt class="tag-source">Source:</dt>
479502
<dd class="tag-source"><ul class="dummy"><li>
480-
<a href="directives_map.js.html">directives/map.js</a>, <a href="directives_map.js.html#line68">line 68</a>
503+
<a href="directives_map.js.html">directives/map.js</a>, <a href="directives_map.js.html#line70">line 70</a>
481504
</li></ul></dd>
482505
-->
483506

build/scripts/ng-map.debug.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,6 +1363,8 @@ ngMap.directive('mapType', ['Attr2Options', '$window', function(Attr2Options, $w
13631363
* The center of map incase geolocation failed. i.e. [0,0]
13641364
* @param {Boolean} zoom-to-include-markers
13651365
* When true, map boundary will be changed automatially to include all markers when initialized
1366+
* @param {Boolean} default-style
1367+
* When false, the default styling, `display:block;height:300px`, will be ignored.
13661368
* @param {String} init-event The name of event to initialize this map.
13671369
* If this option is given, the map won't be initialized until the event is received.
13681370
* To invoke the event, use $scope.$emit or $scope.$broacast.
@@ -1426,11 +1428,13 @@ ngMap.directive('mapType', ['Attr2Options', '$window', function(Attr2Options, $w
14261428
/**
14271429
* if style is not given to the map element, set display and height
14281430
*/
1429-
if (getStyle(element[0], 'display') != "block") {
1430-
element.css('display','block');
1431-
}
1432-
if (getStyle(element[0], 'height').match(/^(0|auto)/)) {
1433-
element.css('height','300px');
1431+
if (attrs.defaultStyle !== 'false') {
1432+
if (getStyle(element[0], 'display') != "block") {
1433+
element.css('display','block');
1434+
}
1435+
if (getStyle(element[0], 'height').match(/^(0|auto)/)) {
1436+
element.css('height','300px');
1437+
}
14341438
}
14351439

14361440
/**

build/scripts/ng-map.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,6 +1363,8 @@ ngMap.directive('mapType', ['Attr2Options', '$window', function(Attr2Options, $w
13631363
* The center of map incase geolocation failed. i.e. [0,0]
13641364
* @param {Boolean} zoom-to-include-markers
13651365
* When true, map boundary will be changed automatially to include all markers when initialized
1366+
* @param {Boolean} default-style
1367+
* When false, the default styling, `display:block;height:300px`, will be ignored.
13661368
* @param {String} init-event The name of event to initialize this map.
13671369
* If this option is given, the map won't be initialized until the event is received.
13681370
* To invoke the event, use $scope.$emit or $scope.$broacast.
@@ -1426,11 +1428,13 @@ ngMap.directive('mapType', ['Attr2Options', '$window', function(Attr2Options, $w
14261428
/**
14271429
* if style is not given to the map element, set display and height
14281430
*/
1429-
if (getStyle(element[0], 'display') != "block") {
1430-
element.css('display','block');
1431-
}
1432-
if (getStyle(element[0], 'height').match(/^(0|auto)/)) {
1433-
element.css('height','300px');
1431+
if (attrs.defaultStyle !== 'false') {
1432+
if (getStyle(element[0], 'display') != "block") {
1433+
element.css('display','block');
1434+
}
1435+
if (getStyle(element[0], 'height').match(/^(0|auto)/)) {
1436+
element.css('height','300px');
1437+
}
14341438
}
14351439

14361440
/**

build/scripts/ng-map.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngmap",
3-
"version": "1.8.0",
3+
"version": "1.8.1",
44
"main": "build/scripts/ng-map.js",
55
"dependencies": {
66
"glob": "~4.0.2",

0 commit comments

Comments
 (0)