Free trial

Pick a framework to get started

close

Get Started

play_arrow

Learn more

play_arrow

Common use cases

play_arrow

Open a document

play_arrow

Save a document

play_arrow

Viewer

play_arrow

UI Customization

play_arrow

Annotations

play_arrow

Collaboration

play_arrow

Forms

play_arrow

Signature

play_arrow

Searching

play_arrow

Measurement

play_arrow

PDF.js Express REST API

play_arrow

Migration Guides

play_arrow

Freeform rotation for annotations

Line, Polyline, Polygon or Freehand annotations show a rotation control when selected. This control handle lets the user rotate the annotation with a full range (360 degrees).

freeform_rotation_polygon_annotation

Disabling freeform rotation

By default, freeform rotation is enabled for all Line, Polyline, Polygon or Freehand annotations. In order to disable it, the following can be done:

Webviewer(...)
  .then(instance => {
    const { annotManager } = instance;

    annotManager.on('annotationChanged', (annotations, action) => {
      if (action === 'add') {
        annotations.forEach((annotation) => {
          annotation.setRotationControlEnabled(false);
        });
      }
    });
  });
Webviewer(...)
  .then(instance => {
    const { annotationManager } = instance.Core;

    annotationManager.on('annotationChanged', (annotations, action) => {
      if (action === 'add') {
        annotations.forEach((annotation) => {
          annotation.setRotationControlEnabled(false);
        });
      }
    });
  });