See ReactComponentView and BackboneModelWatchMixin, below.
The BackboneModelWatchView could use some additional methods to allow adding/removing watched models after the component is created.
| /* | |
| Script to gradualy increase opacity by layer and set blendMode in Photoshop | |
| Usage: | |
| Save script | |
| In Photoshop assuming file is open with multiple layers | |
| File -> Scripts -> Browse... | |
| Select opacity-photoshop-script.jsx from file system | |
| */ | |
| var numLayers = app.activeDocument.layers.length; // total number of layers |
| .aspectWrapper { | |
| position: absolute; | |
| width: 100%; | |
| height: 100%; | |
| } | |
| .wrapper { | |
| position: absolute; | |
| width: 100%; | |
| height: 100%; |
| import PureComponent from './purecomponent.react' | |
| import React from 'react' | |
| import {firebase, onFirebaseError} from '../firebase' | |
| import {firebaseCursor} from '../state' | |
| // This is super handy for monitoring listened refs. | |
| function addListenedRef(ref) { | |
| firebaseCursor(firebase => firebase | |
| .update('listenedRefs', listenedRefs => listenedRefs | |
| .push(ref.toString()) |