Skip to content

Commit

Permalink
Dynamically set actions position.
Browse files Browse the repository at this point in the history
(cherry picked from commit 37ab5b8)
  • Loading branch information
DevinClark authored and jacobtoye committed Dec 19, 2013
1 parent 7a58f84 commit 762e872
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,7 @@ L.Toolbar = L.Class.extend({
_showActionsToolbar: function () {
var buttonIndex = this._activeMode.buttonIndex,
lastButtonIndex = this._lastButtonIndex,
buttonHeight = 26, // TODO: this should be calculated
borderHeight = 1, // TODO: this should also be calculated
toolbarPosition = (buttonIndex * buttonHeight) + (buttonIndex * borderHeight) - 1;
toolbarPosition = this._activeMode.button.offsetTop - 1;

// Recreate action buttons on every click
this._createActions(this._activeMode.handler);
Expand Down

0 comments on commit 762e872

Please sign in to comment.