Skip to content

Commit

Permalink
Merge the options in DrawToolbar to ensure the titles are copied over.
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtoye committed May 21, 2013
1 parent acc6b3c commit d134743
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/draw/DrawToolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ L.DrawToolbar = L.Toolbar.extend({
},

initialize: function (options) {
// Ensure that the options are merged correctly since L.extend is only shallow
for(var type in this.options) {
options[type] = L.extend({}, this.options[type], options[type]);
}

L.Toolbar.prototype.initialize.call(this, options);
},

Expand Down

0 comments on commit d134743

Please sign in to comment.