Skip to content

Commit

Permalink
rename to triggerWhenObjectsFocused
Browse files Browse the repository at this point in the history
  • Loading branch information
dqnykamp authored and jaltekruse committed Feb 24, 2023
1 parent 83e65e8 commit 03a9832
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/DoenetML/tagSpecific/callaction.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,7 @@ describe('CallAction Tag Tests', function () {
<copy prop="coords" target="P" assignNames="P2" />
<p name="nums"><aslist><sampleRandomNumbers name="s" numberOfSamples="5" type="discreteUniform" from="1" to="6" /></aslist></p>
<p><callAction target="s" actionName="resample" name="rs" triggerWhenMouseDownOnObjects="P" >
<p><callAction target="s" actionName="resample" name="rs" triggerWhenObjectsFocused="P" >
<label>roll dice</label>
</callAction></p>
`}, "*");
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/DoenetML/tagSpecific/triggerset.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ describe('TriggerSet Tag Tests', function () {
<math name="x">x</math>
<math name="y">y</math>
<triggerSet triggerWhenMouseDownOnObjects="P" >
<triggerSet triggerWhenObjectsFocused="P" >
<updateValue name="trip" target="x" newValue="3$x" simplify />
<updateValue name="quad" target="y" newValue="4$y" simplify />
</triggerSet>
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/DoenetML/tagSpecific/updatevalue.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ describe('UpdateValue Tag Tests', function () {
</graph>
<math name="x">x</math>
<updateValue name="trip" target="x" newValue="3$x" simplify triggerWhenMouseDownOnObjects="P" />
<updateValue name="trip" target="x" newValue="3$x" simplify triggerWhenObjectsFocused="P" />
`}, "*");
});
cy.get('#\\/_text1').should('have.text', 'a') //wait for page to load
Expand Down
10 changes: 5 additions & 5 deletions src/Core/components/CallAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default class CallAction extends InlineComponent {
createTargetComponentNames: true,
}

attributes.triggerWhenMouseDownOnObjects = {
attributes.triggerWhenObjectsFocused = {
createTargetComponentNames: "string"
}

Expand Down Expand Up @@ -173,9 +173,9 @@ export default class CallAction extends InlineComponent {
dependencyType: "attributeTargetComponentNames",
attributeName: "triggerWhenObjectsClicked"
},
triggerWhenMouseDownOnObjects: {
triggerWhenObjectsFocused: {
dependencyType: "attributeTargetComponentNames",
attributeName: "triggerWhenMouseDownOnObjects"
attributeName: "triggerWhenObjectsFocused"
},
triggerWhen: {
dependencyType: "attributeComponent",
Expand All @@ -202,8 +202,8 @@ export default class CallAction extends InlineComponent {
triggerWith.push({ target: nameObj.absoluteName, triggeringAction: "click" })
}
}
if (dependencyValues.triggerWhenMouseDownOnObjects !== null) {
for (let nameObj of dependencyValues.triggerWhenMouseDownOnObjects) {
if (dependencyValues.triggerWhenObjectsFocused !== null) {
for (let nameObj of dependencyValues.triggerWhenObjectsFocused) {
triggerWith.push({ target: nameObj.absoluteName, triggeringAction: "down" })
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/Core/components/TriggerSet.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default class triggerSet extends InlineComponent {
createTargetComponentNames: true,
}

attributes.triggerWhenMouseDownOnObjects = {
attributes.triggerWhenObjectsFocused = {
createTargetComponentNames: "string"
}

Expand Down Expand Up @@ -86,9 +86,9 @@ export default class triggerSet extends InlineComponent {
dependencyType: "attributeTargetComponentNames",
attributeName: "triggerWhenObjectsClicked"
},
triggerWhenMouseDownOnObjects: {
triggerWhenObjectsFocused: {
dependencyType: "attributeTargetComponentNames",
attributeName: "triggerWhenMouseDownOnObjects"
attributeName: "triggerWhenObjectsFocused"
},
triggerWhen: {
dependencyType: "attributeComponent",
Expand All @@ -110,8 +110,8 @@ export default class triggerSet extends InlineComponent {
triggerWith.push({ target: nameObj.absoluteName, triggeringAction: "click" })
}
}
if (dependencyValues.triggerWhenMouseDownOnObjects !== null) {
for (let nameObj of dependencyValues.triggerWhenMouseDownOnObjects) {
if (dependencyValues.triggerWhenObjectsFocused !== null) {
for (let nameObj of dependencyValues.triggerWhenObjectsFocused) {
triggerWith.push({ target: nameObj.absoluteName, triggeringAction: "down" })
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/Core/components/UpdateValue.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default class UpdateValue extends InlineComponent {
createTargetComponentNames: "string"
}

attributes.triggerWhenMouseDownOnObjects = {
attributes.triggerWhenObjectsFocused = {
createTargetComponentNames: "string"
}

Expand Down Expand Up @@ -329,9 +329,9 @@ export default class UpdateValue extends InlineComponent {
dependencyType: "attributeTargetComponentNames",
attributeName: "triggerWhenObjectsClicked"
},
triggerWhenMouseDownOnObjects: {
triggerWhenObjectsFocused: {
dependencyType: "attributeTargetComponentNames",
attributeName: "triggerWhenMouseDownOnObjects"
attributeName: "triggerWhenObjectsFocused"
},
triggerWhen: {
dependencyType: "attributeComponent",
Expand All @@ -358,8 +358,8 @@ export default class UpdateValue extends InlineComponent {
triggerWith.push({ target: nameObj.absoluteName, triggeringAction: "click" })
}
}
if (dependencyValues.triggerWhenMouseDownOnObjects !== null) {
for (let nameObj of dependencyValues.triggerWhenMouseDownOnObjects) {
if (dependencyValues.triggerWhenObjectsFocused !== null) {
for (let nameObj of dependencyValues.triggerWhenObjectsFocused) {
triggerWith.push({ target: nameObj.absoluteName, triggeringAction: "down" })
}
}
Expand Down

0 comments on commit 03a9832

Please sign in to comment.