Skip to content
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

add customizeable colors to link portal and title (fixes #2930) #3106

Merged
merged 2 commits into from
Oct 2, 2017

Conversation

michaelybecker
Copy link
Contributor

Description:
Fixes #2930 + adds customisable title color prop

Changes proposed:

  • Adds prop to change link portal background color (rather than the hardcoded red)
  • Adds prop to change link title color
  • Refactors link declaration schema to be accordingly specific: borderColor, innerColor and titleColor
  • Updates docs accordingly

@@ -60,14 +60,16 @@ We also provide a link primitive with a different syntax:

| Property | Description | Default Value |
|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------|---------------|
| color | Background color of the portal. | white |
| borderColor | Border color of the portal. | white |
| innerColor | Inner (background) color of the portal. | red |
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps backgroundColor

if (data.on !== oldData.on) { this.updateEventListener(); }
if (data.visualAspectEnabled && oldData.peekMode !== undefined && data.peekMode !== oldData.peekMode) {
this.updatePeekMode();
}
if (!data.image || oldData.image === data.image) { return; }
el.setAttribute('material', 'pano',
typeof data.image === 'string' ? data.image : data.image.src);
typeof data.image === 'string' ? data.image : data.image.src);
Copy link
Member

Choose a reason for hiding this comment

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

don't need to change this

@@ -92,15 +96,15 @@ module.exports.Component = registerComponent('link', {
semiSphereEl = this.semiSphereEl = this.semiSphereEl || document.createElement('a-entity');

// Set Portal
el.setAttribute('geometry', {primitive: 'circle', radius: 1.0, segments: 64});
el.setAttribute('geometry', { primitive: 'circle', radius: 1.0, segments: 64 });
Copy link
Member

Choose a reason for hiding this comment

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

don't need to change this

pano: {type: 'map', is: 'uniform'},
borderEnabled: {default: 1.0, type: 'int', is: 'uniform'},
strokeColor: {default: 'white', type: 'color', is: 'uniform'}
pano: { type: 'map', is: 'uniform' },
Copy link
Member

Choose a reason for hiding this comment

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

don't need to add spaces to objects

@ngokevin ngokevin changed the title add customizeable colors to link portal and title add customizeable colors to link portal and title (fixes #2930) Oct 2, 2017
@ngokevin ngokevin merged commit b73d176 into aframevr:master Oct 2, 2017
@ngokevin
Copy link
Member

ngokevin commented Oct 2, 2017

thanks!

@michaelybecker
Copy link
Contributor Author

@ngokevin thanks and sorry about the weird spaces - working through some linting issues in my local dev env. Won't happen next time;)

@ngokevin
Copy link
Member

ngokevin commented Oct 2, 2017

Nah don't care, just fixed it up to merge it quick

@michaelybecker michaelybecker deleted the fix-link-color branch October 3, 2017 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants