deactivateAction method

dynamic deactivateAction(
  1. dynamic action
)

Implementation

deactivateAction(action) {
  if (isActiveAction(action)) {
    var bindings = action.propertyBindings;

    // decrement reference counts / sort out state
    for (var i = 0, n = bindings.length; i != n; ++i) {
      var binding = bindings[i];

      if (--binding.useCount == 0) {
        binding.restoreOriginalState();
        _takeBackBinding(binding);
      }
    }

    _takeBackAction(action);
  }
}