code: function setToolOptions(toolType, element, options) {
    if (!elementToolOptions[toolType]) {
      elementToolOptions[toolType] = [
        {
          element,
          options,
        },
      ];
  
      return;
    }
  
    const toolOptions = elementToolOptions[toolType];
    const index = toolOptions.findIndex(
      toolOptionObject => toolOptionObject.element === element
    );
  
    if (index === -1) {
      elementToolOptions[toolType].push({
        element,
        options,
      });
    } else {
      const elementOptions = elementToolOptions[toolType][index].options || {};
  
      elementToolOptions[toolType][index].options = Object.assign(
        elementOptions,
        options
      );
    }
  }
docs: Set the options object associated with a particular toolType and element.
  @export
  @public
  @method
  @name setToolOptions
  
  @param {string} toolType Tool type identifier of the target options object.
  @param {HTMLElement} element Element of the target options object.
  @param {Object} options Options object to store at target.
  @returns {void}