main.js
function _handleDocGeneratorSettingsChange(id, change) {
        var curSettings = _getChangedSettings(change.current),
            prevSettings = _getChangedSettings(change.previous),
            curEnabled = !!(curSettings && curSettings.enabled),
            prevEnabled = !!(prevSettings && prevSettings.enabled);
        
        if (prevEnabled !== curEnabled) {
            if (curEnabled) {
                _stateManager.activate(id);
            } else {
                _stateManager.deactivate(id);
            }
        }
    }
function _handleDocGeneratorSettingsChange(id, change) {
        var curSettings = _getChangedSettings(change.current),
            prevSettings = _getChangedSettings(change.previous),
            curEnabled = !!(curSettings && curSettings.enabled),
            prevEnabled = !!(prevSettings && prevSettings.enabled);
        
        if (prevEnabled !== curEnabled) {
            if (curEnabled) {
                _stateManager.activate(id);
            } else {
                _stateManager.deactivate(id);
            }
        }
    }
function _handleDocGeneratorSettingsChange ( id , change ) { var curSettings = _getChangedSettings ( change . current ) , prevSettings = _getChangedSettings ( change . previous ) , curEnabled = ! ! ( curSettings && curSettings . enabled ) , prevEnabled = ! ! ( prevSettings && prevSettings . enabled ) ; if ( prevEnabled !== curEnabled ) { if ( curEnabled ) { _stateManager . activate ( id ) ; } else { _stateManager . deactivate ( id ) ; } } }
Handler for a the "generatorSettings" change event fired by Document objects. Updates
the state manger based on the current doc setting if the enable settings actually
changed

@private
@param {number} id The ID of the Document that changed
@param {{previous: settings=, current: settings=}} change The previous and current
document settings
Handler for a the generatorSettings change event fired by Document objects . Updates the state manger based on the current doc setting if the enable settings actually changed