[Code Style] Rename shadowing variables

This commit is contained in:
Victor Woeltjen
2016-05-20 11:39:49 -07:00
parent e468080373
commit ad5691142e
56 changed files with 256 additions and 262 deletions

View File

@@ -63,10 +63,10 @@ define(
});
}
function showDialog(type) {
function showDialog(objType) {
// Create a dialog object to generate the form structure, etc.
var dialog =
new PropertiesDialog(type, domainObject.getModel());
new PropertiesDialog(objType, domainObject.getModel());
// Show the dialog
return dialogService.getUserInput(

View File

@@ -75,8 +75,8 @@ define(
* Invoke persistence on a domain object. This will be called upon
* the removed object's parent (as its composition will have changed.)
*/
function doPersist(domainObject) {
var persistence = domainObject.getCapability('persistence');
function doPersist(domainObj) {
var persistence = domainObj.getCapability('persistence');
return persistence && persistence.persist();
}

View File

@@ -223,7 +223,7 @@ define(
// Update value for this property in all elements of the
// selection which have this property.
function updateProperties(property, value) {
function updateProperties(property, val) {
var changed = false;
// Update property in a selected element
@@ -233,12 +233,12 @@ define(
// Check if this is a setter, or just assignable
if (typeof selected[property] === 'function') {
changed =
changed || (selected[property]() !== value);
selected[property](value);
changed || (selected[property]() !== val);
selected[property](val);
} else {
changed =
changed || (selected[property] !== value);
selected[property] = value;
changed || (selected[property] !== val);
selected[property] = val;
}
}
}

View File

@@ -133,11 +133,11 @@ define(
self = this;
// Initialize toolbar (expose object to parent scope)
function initialize(definition) {
function initialize(def) {
// If we have been asked to expose toolbar state...
if (self.attrs.toolbar) {
// Initialize toolbar object
self.toolbar = new EditToolbar(definition, self.commit);
self.toolbar = new EditToolbar(def, self.commit);
// Ensure toolbar state is exposed
self.exposeToolbar();
}

View File

@@ -37,11 +37,11 @@ define(
model = { x: "initial value" };
properties = ["x", "y", "z"].map(function (k) {
return {
getValue: function (model) {
return model[k];
getValue: function (m) {
return m[k];
},
setValue: function (model, v) {
model[k] = v;
setValue: function (m, v) {
m[k] = v;
},
getDefinition: function () {
return { control: 'textfield '};