addDrawingArea - Methods - Annotations API

Annotations API Methods


Adds one drawing area. A drawing area is a rectangular zone on the page that contains one part of the drawing. Takes two values, one for the drawing id and one for the HTML element that will be the drawing container.


itemsApp.assessApp().annotationsApp().module('drawing').addDrawingArea('12', document.body);


  • id string

    A unique string value up to 150 characters in length.

  • container object

    The DOM element upon which drawings can be made.

Return value

Type object

An object describing a rectangular bounding box, which contains individual drawings.

  • getContainerElement function

    The DOM element that was used to initialize the drawing area.

  • getContainerWidth function

    Returns the container width in pixels, or returns undefined if not set.

  • getId function

    The id that the DrawingArea was initialized with. Returns a string value.

Was this article helpful?

Did you arrive here by accident? If so, learn more about Learnosity.