Coupling

<script src="./point_src/coupling"></script>

Bind the values of a point with another point. Provide a relative offset object.

coupling = new Coupling()
coupling.couple(a, b, { x: 10, y: 10})

Both points are reative to their coupled position:

// Dragging either point will result in constant coupling.
dragging.add(a, b)
Meta Data
title Coupling
dependencies ()
unused_keys ()
unknown_keys ()
filepath_exists True
path coupling
filepath coupling.js
clean_files ()

  • ClassDeclaration
    class comments:
    --- title: Coupling --- Bind the values of a point with another point. Provide a relative offset object. coupling = new Coupling() coupling.couple(a, b, { x: 10, y: 10}) Both points are reative to their coupled position: // Dragging either point will result in constant coupling. dragging.add(a, b)
    Couple two points, binding the x,y,radius,rotation Apply a relative offset to update the values between binding changes when a side is manipulated, the _other_ side is updated. If B is the altered value, the relativeOffset is applied inversly. Apply a function to the relative offset key to capture live change.s
    • constructor

      constructor

      (
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      couple

      (
      a , b , offset , keys = []
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      Couple two points, binding the x,y,radius,rotation Apply a relative offset to update the values between binding changes when a side is manipulated, the _other_ side is updated. If B is the altered value, the relativeOffset is applied inversly. Apply a function to the relative offset key to capture live change.s
    • method

      step

      (
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      Perform a single _step_ of the coupling test, if either side of the connection has changed, bubble the update to its sibling - through the relative conversion.
    • method

      hasChanged

      (
      a , aCache
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      Given an object and its _cache_, test each key in the _cache_ and return a Set of changed keys hasChanged({foo: 20, bar: 10}, {foo: 10, bar: 10}) ['foo'] The return keys are values that do not match _a_. If the cache is flagged _dirty_, all keys are returned. hasChanged({foo: 20, bar:10}, {foo: 20, bar: 10, dirty: true}) ['foo', 'bar'] If no changes are detected `undefined` is returned. if(this.hasChanged({}, {})) { // is not called. }
    dict_keys(['kind', 'word', 'parentName', 'type', 'body', 'comments', 'pos'])
  • ClassDeclaration
    class comments:
    Couple two points, binding the x,y,radius,rotation Apply a relative offset to update the values between binding changes when a side is manipulated, the _other_ side is updated. If B is the altered value, the relativeOffset is applied inversly. Apply a function to the relative offset key to capture live change.s
    • constructor

      constructor

      (
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      couple

      (
      a , b , offset , keys = undefined
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      Couple two points, binding the x,y,radius,rotation Apply a relative offset to update the values between binding changes when a side is manipulated, the _other_ side is updated. If B is the altered value, the relativeOffset is applied inversly. Apply a function to the relative offset key to capture live change.s
    • method

      step

      (
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      Install the current primary value into its cache. and apply the value to the second entity, also applying its new value to its cache,
    • method

      hasChanged

      (
      a , aCache
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      Given an object and its _cache_, test each key in the _cache_ and return a Set of changed keys hasChanged({foo: 20, bar: 10}, {foo: 10, bar: 10}) ['foo'] The return keys are values that do not match _a_. If the cache is flagged _dirty_, all keys are returned. hasChanged({foo: 20, bar:10}, {foo: 20, bar: 10, dirty: true}) ['foo', 'bar'] If no changes are detected `undefined` is returned. if(this.hasChanged({}, {})) { // is not called. }
    dict_keys(['kind', 'word', 'parentName', 'type', 'body', 'comments', 'pos'])