Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

Commit

Permalink
addControl/createControl now accepts HTML elements or HTML strings
Browse files Browse the repository at this point in the history
  • Loading branch information
hpneo committed Oct 2, 2014
1 parent 1362e36 commit 3c2136b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ grunt
Changelog
---------

0.4.15
-----------------------
* addControl/createControl now accepts HTML elements or HTML strings

0.4.14
-----------------------
* Fix bug in drawPolygon
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "gmaps",
"version": "0.4.14",
"version": "0.4.15",
"main": "gmaps.js"
}
7 changes: 6 additions & 1 deletion lib/gmaps.controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ GMaps.prototype.createControl = function(options) {
}

if (options.content) {
control.innerHTML = options.content;
if (typeof options.content === 'string') {
control.innerHTML = options.content;
}
else if (options.content instanceof HTMLElement) {
control.appendChild(options.content);
}
}

if (options.position) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gmaps",
"version": "0.4.14",
"version": "0.4.15",
"description": "the easiest way to use Google Maps",
"main": "gmaps.js",
"scripts": {
Expand Down

0 comments on commit 3c2136b

Please sign in to comment.