code: function(options) {
      this.element = options.element;
      this.size = options.size;
      this.canvas = document.createElement("canvas");
      // We have to put this in the DOM before asking it's size.
      this.element.appendChild(this.canvas);
      this.resize();
      this.ctx = this.canvas.getContext("2d");
      this.drawBits(0);
    }
docs: @typedef {Object} DPad~Options
  @property {HTMLElement} elemnt element to put dpad inside.
  DPad will be resized to fit this element or to the
  size specified
  @property {number} size size in CSS pixels to make DPad
   
  Renders a Dpad
  
  @constructor
  @alias DPad
  @param {DPad~Options} options