Skip to content

Conversation

@dmarcos
Copy link
Member

@dmarcos dmarcos commented Jun 30, 2016

No description provided.

if (name in this.components) { return; }
component = this.components[name] = new components[name].Component(this, data);
if (id && !components[name].multiple) {
throw new Error('Trying to initialize multiple components of type ' + name +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and put backticks around name

@ngokevin
Copy link
Member

I found removeAttribute doesn't detach the component.

@dmarcos dmarcos force-pushed the multipleComponents branch 2 times, most recently from f9eb1cf to fd97cfd Compare July 1, 2016 06:53
value: function (attrName, data, isDependency) {
var component;
var isComponentDefined = checkComponentDefined(this, name) || data !== undefined;
var componentInfo = attrName.split('__');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably good to make a constant for this.

MULTI_DELIMITER = '__';

@ngokevin
Copy link
Member

ngokevin commented Jul 1, 2016

Add test for getComputedAttribute for multi

r+wc

@dmarcos dmarcos force-pushed the multipleComponents branch from fd97cfd to 6bdce07 Compare July 1, 2016 21:06
@dmarcos dmarcos merged commit 380e4d2 into aframevr:master Jul 1, 2016
@ngokevin
Copy link
Member

ngokevin commented Jul 1, 2016

nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants