Skip to content

Commit

Permalink
Fix #143, add @demo, and fix tests
Browse files Browse the repository at this point in the history
Fix for #143.
It looks like my 1.0 port introduced a spurious check for this.marker
and this.marker is non-existent.
  • Loading branch information
atotic authored and - committed Jun 8, 2015
1 parent 28dbfd5 commit 79dd5f3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions google-map.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
start-address="San Francisco" end-address="Mountain View">
</google-map-directions>
@demo
-->

<dom-module id="google-map">
Expand Down Expand Up @@ -464,7 +465,7 @@
},

_clickEventsChanged: function() {
if (this.map && this.marker) {
if (this.map) {
if (this.clickEvents) {
this._forwardEvent('click');
this._forwardEvent('dblclick');
Expand Down Expand Up @@ -492,7 +493,7 @@
},

_mouseEventsChanged: function() {
if (this.map && this.marker) {
if (this.map) {
if (this.mouseEvents) {
this._forwardEvent('mousemove');
this._forwardEvent('mouseout');
Expand Down
2 changes: 1 addition & 1 deletion test/google-map-basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
test('defaults', function() {
assert.equal(map.markers.length, 0);
assert.isFalse(map.fitToMarkers);
assert.isFalse(map.disableDefaultUI);
assert.isFalse(map.disableDefaultUi);
assert.equal(map.zoom, 10);
assert.equal(map.noAutoTilt, false);
assert.isUndefined(map.maxZoom);
Expand Down
4 changes: 2 additions & 2 deletions test/marker-basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
var markerEl = Polymer.dom(map).querySelector('google-map-marker');
assert.isUndefined(markerEl.marker);
assert.isUndefined(markerEl.map);
assert.isUndefined(markerEl.icon);
assert.isUndefined(markerEl.info);
assert.isNull(markerEl.icon);
assert.isNull(markerEl.info);
assert.equal(markerEl.zIndex, 0);
assert.equal(markerEl.latitude, 37.779);
assert.equal(markerEl.longitude, -122.3892);
Expand Down

0 comments on commit 79dd5f3

Please sign in to comment.