-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#188045959] Sampler changes to use attr and collection IDs to send data to CODAP #144
base: master
Are you sure you want to change the base?
Conversation
… may have been changed. Make names less mutable. Only changes the title prop when user changes variable name.
@@ -63,7 +70,7 @@ var CodapCom = function(getStateFunc, loadStateFunc, localeMgr) { | |||
const attrName = msg.values.result.attrs[i].name; | |||
const attrKey = _this.findKeyById(id); | |||
// update the device name if the user has changed it in the codap table | |||
if (attrKey === "output" && _this.attrMap["output"].name !== attrName) { | |||
if (attrKey === "output" && _this.attrMap.items["output"].name !== attrName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this check if _this.attrMap.items["output"].title
is not equal to attrName
(since the title
property changes but not the name
property?
if (getDatasetResult && !getDatasetResult.success) { | ||
if (deviceName && deviceName !== _this.attrMap.items["output"].name) { | ||
_this.deviceName = deviceName; | ||
_this.attrMap.items["output"].name = deviceName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question here about checking title
vs name
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, nevermind. I see we would be creating the new attribute with the new deviceName.
I do wonder if it would be better to always keep the name of this attribute 'output' and only change the title to the deviceName, though.
attrs: [{name: deviceName,title: deviceName}] | ||
name: _this.collectionMap.items.name, | ||
parent: _this.collectionMap.samples.id, | ||
attrs: [{title: deviceName}] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this attr have a name
property also?
Changes sending data to CODAP using attr IDs and collection IDs which may have been changed.
Make names less mutable. Only changes the title prop when user changes variable name.