layer([layer])

Returns the current layer if no argument is given. Sets active layer if layer object or name of existing layer is given. Newly creates layer and sets it to active if new name is given.

Type: function

Parameter(s):

  • layer {} Optional:

    The layer or layer name to set the current layer to.

Returns:

  • {Layer}:

    The current layer instance.