Sequence Controller C3D.ctrls.Sequencesextend

Manages C3D.models.SequenceSets in the canvas.

Properties

Access properties with .nameand .name = value.

Methods

Call methods with.name(),.name(arguments)or just .name arguments .

  • clear ([options]) -> undefined# Backbone.Model

    Removes all attributes from the model, including the id attribute. Fires a "change" event unless silent is passed as an option.

    Parameters
    options
    Object (Optional)
  • clone ( ) -> Backbone.Model# Backbone.Model

    Returns a copy of the model.

    Return
    return
    Backbone.Model

    copy of the model

  • find (cid) -> C3D.models.SequenceSet#

    Finds a sequence set by cid

    Parameters
    cid
    String
  • generateSequences ( ) -> undefined#

    Generates sequences using the active sequence set, but does not thread them onto the strands in the canvas.

  • generateThreadSequences ( ) -> undefined#

    Generates sequences using the active sequence set, and @link C3D.models.SequenceSet.thread threads} them onto the strands in the canvas.

  • get (attribute) -> Mixed# Backbone.Model

    Get the current value of an attribute from the model. For example: note.get("title")

    Parameters
    attribute
    String

    Attribute to get

    Return
    return
    Mixed

    value of the attribute

  • getActive ( ) -> C3D.models.SequenceSet#

    Gets the active sequence set

  • getSSets ( ) -> C3D.models.SequenceSet[]#

    Gets a list of sequence sets defined on this canvas, adding some if they don't exist

    Return
  • has (attribute) -> Boolean# Backbone.Model

    Returns true if the attribute is set to a non-null or non-undefined value.

    if (note.has("title")) {
      ...
    }
    
    Parameters
    attribute
    String
    Return
    return
    Boolean

    true if the attribute is non-null or non-undefined, else false

  • set (attribute, [options]) -> undefined# Backbone.Model

    Set a hash of attributes (one or many) on the model. If any of the attributes change the model's state, a change event will be triggered on the model. Change events for specific attributes are also triggered, and you can bind to those as well, for example: change:title, and change:content. You may also pass individual keys and values.

    note.set({title: "March 20", content: "In his eyes she eclipses..."});
    
    book.set("title", "A Scandal in Bohemia");
    
    Parameters
    attribute
    String/Object

    (s)

    options
    Object (Optional)
  • setActive (sset) -> undefined#

    Sets the active sequence set

    Parameters
  • threadSequences ( ) -> undefined#

    Threads sequences onto the strands in the canvas.

  • unset (attribute, [options]) -> undefined# Backbone.Model

    Remove an attribute by deleting it from the internal attributes hash. Fires a "change" event unless silent is passed as an option.

    Parameters
    attribute
    String
    options
    Object (Optional)