.. role:: ts-api-decorator

##########
MarkupView
##########

.. js:module:: Markup
   :noindex:

.. container:: ts-api-section

   .. js:class:: MarkupView



.. container:: api-index-section

   .. rubric:: Methods

   .. rst-class:: api-index-list-item api-kind-method api-parent-kind-class

   * :js:meth:`~Markup.MarkupView.addMarkupItem`
   * :js:meth:`~Markup.MarkupView.getCamera`
   * :js:meth:`~Markup.MarkupView.getColorMap`
   * :js:meth:`~Markup.MarkupView.getCuttingPlaneData`
   * :js:meth:`~Markup.MarkupView.getDefaultVisibility`
   * :js:meth:`~Markup.MarkupView.getExplodeMagnitude`
   * :js:meth:`~Markup.MarkupView.getFaceVisibility`
   * :js:meth:`~Markup.MarkupView.getLineVisibility`
   * :js:meth:`~Markup.MarkupView.getMarkup`
   * :js:meth:`~Markup.MarkupView.getName`
   * :js:meth:`~Markup.MarkupView.getSheetId`
   * :js:meth:`~Markup.MarkupView.getSnapshotImage`
   * :js:meth:`~Markup.MarkupView.getUniqueId`
   * :js:meth:`~Markup.MarkupView.getVisibilityExceptions`
   * :js:meth:`~Markup.MarkupView.removeMarkup`
   * :js:meth:`~Markup.MarkupView.setColorMap`
   * :js:meth:`~Markup.MarkupView.setCuttingPlaneData`
   * :js:meth:`~Markup.MarkupView.setDefaultVisibility`
   * :js:meth:`~Markup.MarkupView.setExplodeMagnitude`
   * :js:meth:`~Markup.MarkupView.setFaceVisibility`
   * :js:meth:`~Markup.MarkupView.setLineVisibility`
   * :js:meth:`~Markup.MarkupView.setName`
   * :js:meth:`~Markup.MarkupView.setSnapshotImage`
   * :js:meth:`~Markup.MarkupView.setVisibilityExceptions`
   * :js:meth:`~Markup.MarkupView.toJson`





------------

Methods
=======

.. rst-class:: ts-api-section

addMarkupItem
-------------

.. js:method:: MarkupView.addMarkupItem( markupItem)

   :param markupItem: the markup to be added to this view.
   :type markupItem: MarkupItem


   Adds a markup item to this view


   :rtype: void

.. rst-class:: ts-api-section

getCamera
---------

.. js:method:: MarkupView.getCamera()



   Gets the camera of this view

   :returns: the camera of this view


   :rtype: Camera

.. rst-class:: ts-api-section

getColorMap
-----------

.. js:method:: MarkupView.getColorMap()





   :returns: A color map associating NodeIds to Colors.


   :rtype: Map <number, Color>

.. rst-class:: ts-api-section

getCuttingPlaneData
-------------------

.. js:method:: MarkupView.getCuttingPlaneData()





   :returns: a JSON object with the cutting plane data associated with this view


   :rtype: object

.. rst-class:: ts-api-section

getDefaultVisibility
--------------------

.. js:method:: MarkupView.getDefaultVisibility()



   :rtype: boolean

.. rst-class:: ts-api-section

getExplodeMagnitude
-------------------

.. js:method:: MarkupView.getExplodeMagnitude()





   :returns: the explode value associated with this view


   :rtype: number

.. rst-class:: ts-api-section

getFaceVisibility
-----------------

.. js:method:: MarkupView.getFaceVisibility()



   Gets face visibility setting for this view

   :returns: face visibility setting for this view


   :rtype: boolean

.. rst-class:: ts-api-section

getLineVisibility
-----------------

.. js:method:: MarkupView.getLineVisibility()



   Gets line visibility setting for this view

   :returns: line visibility setting for this view


   :rtype: boolean

.. rst-class:: ts-api-section

getMarkup
---------

.. js:method:: MarkupView.getMarkup()



   Gets an array of markup items associated with this view

   :returns: face visibility setting for this view


   :rtype: [MarkupItem]

.. rst-class:: ts-api-section

getName
-------

.. js:method:: MarkupView.getName()



   Gets the name of this view

   :returns: name of this view


   :rtype: string

.. rst-class:: ts-api-section

getSheetId
----------

.. js:method:: MarkupView.getSheetId()



   Gets the sheet id for this view

   :returns: the id of the sheet for this view. If no view was active at the time of creation this function will return null.


   :rtype: null | number

.. rst-class:: ts-api-section

getSnapshotImage
----------------

.. js:method:: MarkupView.getSnapshotImage()



   :rtype: null | HTMLImageElement

.. rst-class:: ts-api-section

getUniqueId
-----------

.. js:method:: MarkupView.getUniqueId()



   Gets the unique identifier of this view

   :returns: unique identifier of this view


   :rtype: string

.. rst-class:: ts-api-section

getVisibilityExceptions
-----------------------

.. js:method:: MarkupView.getVisibilityExceptions()



   :rtype: Set <number>

.. rst-class:: ts-api-section

removeMarkup
------------

.. js:method:: MarkupView.removeMarkup( item)

   :param item: None
   :type item: MarkupItem


   Removes a markup item from the view

   :returns: result of the removal operation


   :rtype: boolean

.. rst-class:: ts-api-section

setColorMap
-----------

.. js:method:: MarkupView.setColorMap( colorMap)

   :param colorMap: None
   :type colorMap: Map <number, Color>


   Takes a color map associating NodeIds to Colors and associates it with this view.


   :rtype: void

.. rst-class:: ts-api-section

setCuttingPlaneData
-------------------

.. js:method:: MarkupView.setCuttingPlaneData( cuttingPlaneData)

   :param cuttingPlaneData: None
   :type cuttingPlaneData: object


   Takes a JSON cutting plane data object and associates it with this view


   :rtype: void

.. rst-class:: ts-api-section

setDefaultVisibility
--------------------

.. js:method:: MarkupView.setDefaultVisibility( defaultVisibility)

   :param defaultVisibility: None
   :type defaultVisibility: boolean


   :rtype: void

.. rst-class:: ts-api-section

setExplodeMagnitude
-------------------

.. js:method:: MarkupView.setExplodeMagnitude( explodeMagnitude)

   :param explodeMagnitude: None
   :type explodeMagnitude: number


   Takes an explode magnitude and associates it with this view


   :rtype: void

.. rst-class:: ts-api-section

setFaceVisibility
-----------------

.. js:method:: MarkupView.setFaceVisibility( faceVisibility)

   :param faceVisibility: face visibility setting for this view
   :type faceVisibility: boolean


   Sets face visibility for this view


   :rtype: void

.. rst-class:: ts-api-section

setLineVisibility
-----------------

.. js:method:: MarkupView.setLineVisibility( lineVisibility)

   :param lineVisibility: line visibility setting for this view
   :type lineVisibility: boolean


   Sets line visibility for this view


   :rtype: void

.. rst-class:: ts-api-section

setName
-------

.. js:method:: MarkupView.setName( name)

   :param name: name to set
   :type name: string


   Sets the name for this view


   :rtype: void

.. rst-class:: ts-api-section

setSnapshotImage
----------------

.. js:method:: MarkupView.setSnapshotImage( image)

   :param image: None
   :type image: HTMLImageElement


   :rtype: void

.. rst-class:: ts-api-section

setVisibilityExceptions
-----------------------

.. js:method:: MarkupView.setVisibilityExceptions( nodeIds)

   :param nodeIds: None
   :type nodeIds: Set <number>


   :rtype: void

.. rst-class:: ts-api-section

toJson
------

.. js:method:: MarkupView.toJson()



   Creates an object ready for JSON serialization.

   :returns: The prepared object.


   :rtype: object

