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)
Meta Data
| title | Coupling |
| dependencies | () |
| unused_keys | () |
| unknown_keys | () |
| filepath_exists | True |
| path | coupling |
| filepath | coupling.js |
| clean_files | () |
-
ClassDeclarationclass
Coupling
extends Noneclass 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-
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
-
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. }
ClassDeclarationclassLockedCoupling
extends Noneclass 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-
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
-
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. }