ComPDFKit Web SDK
    Preparing search index...

    Function getToolMode

    • Gets the current tool of the active viewer.

      Returns Tool

      The tool object.

      const tool = instance.UI.getToolMode();
      if (tool.name === instance.Core.Tools.ToolNames.RECTANGLE) {
      console.log('The rectangle tool is active');
      }