diff --git a/lib/features/palette/Palette.js b/lib/features/palette/Palette.js index d99486385..554f74ec3 100644 --- a/lib/features/palette/Palette.js +++ b/lib/features/palette/Palette.js @@ -105,19 +105,19 @@ Palette.prototype.getEntries = function() { return entries; }; - /** * Initialize */ Palette.prototype._init = function() { - var canvas = this._canvas, - eventBus = this._eventBus; + var self = this; + + var eventBus = this._eventBus; + + var parentContainer = this._getParentContainer(); - var parent = canvas.getContainer(), - container = this._container = domify(Palette.HTML_MARKUP), - self = this; + var container = this._container = domify(Palette.HTML_MARKUP); - parent.appendChild(container); + parentContainer.appendChild(container); domDelegate.bind(container, ELEMENT_SELECTOR, 'click', function(event) {