         for key,style of node.style
           li.style[key] = style
         li.addEventListener "click", node.callback
-        li.style.lineHeight = @g.zoomer.get "menuItemLineHeight"
+        if @g?
+          li.style.lineHeight = @g.zoomer.get "menuItemLineHeight"
 
         menuUl.appendChild li
 


      menuUl = document.createElement "ul"
      menuUl.className = "dropdown-menu"
      menuUl.style.fontSize = @g.zoomer.get "menuItemFontsize"

      # dropdown menu
      for node in nodes


    addNode: (label, callback, data) ->
      style = data.style if data?
      @_nodes = [] unless @_nodes?
      @_nodes.push {label: label, callback: callback, style: style}

    buildDOM: ->
