Overrides do not work onload if 'preset' is set
See original GitHub issueWhen a preset has been defined, e.g. preset: starry;
then the preset values are not correctly overridden e.g. 'preset: starry; grid: none;'
will not remove the grid
. Custom values are lost during update
function when you use this.presets[this.data.preset]
.
I have made a temporary fix, which you may want to improve:
if (oldData.preset === undefined || oldData.preset !== this.data.preset) {
var newData = Object.assign({}, this.presets[this.data.preset]);
Object.assign(newData, this.el.components.environment.attrValue);
this.el.setAttribute('environment', newData);
return;
}
UPDATE: My fix doesn’t actually quite work, due to all the if (data.property != oldData.property)
code. So not quite sure of optimal way to fix this.
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Not able to Override the default value for "Valid - ServiceNow
For this i have created a dictionary override , to override the default value. but its not working. its setting to-01-01-2100.
Read more >Form_Load() 'event' or Override OnLoad() - Stack Overflow
You should always override OnLoad (). Using the event is only appropriate when another class would be interested in the event.
Read more >Override webpage resources with local copies (Overrides tab)
The Overrides feature in the Sources tool helps you solve this problem. You can now take a resource of the current webpage and...
Read more >Here's Why You Should Be Using Overrides in Chrome Devtools
Overrides are persistent as long as the devtools are open. When you override a file and make changes to it, the changes will...
Read more >Configuration override system - Drupal
When a configuration form that contained overridden values was ... overridden via $config within settings.php will not be viewable from the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just had the same problem. I’ve been silly hacking it with some
Otherwise having
<a-entity id="sceneEnv" environment="preset:forest;lightPosition=0 5 -10;"></a-entity>
doesn’t work by itself.Interested if you get to fix it! (great component btw!)
I tried many ways of removing the fog from the presets. I successfully remove it but it still causes the conflict with particles, even though it’s clearly removed using setAttribute. It’s visually gone and I can also see that it’s gone from the element inside the debugger, yet it still causes issues. I had to revert to manually changing the hardcoded values inside the presets from this distribution file.