aframevr / aframe-inspector

:mag: Visual inspector tool for A-Frame. Hit *<ctrl> + <alt> + i* on any A-Frame scene.
https://aframe.io/aframe-inspector/examples/
MIT License
654 stars 201 forks source link

Issues with "Copy HTML" functionality (partially broken?) #312

Closed cvan closed 7 years ago

cvan commented 8 years ago

image

Problem: It appears that only when values change can I copy html. So, upon immediately selecting an entity, I clicked on the Geometry component's copy html button, and it added nothing to my clipboard. When I checked the skipCache checkbox, my clipboard now contained skipCache:true. But, when I changed the primitive, now my clipboard was empty again. I'm confused.

Proposed solutions:


Problem: I change a few values on the Material component. I click copy html and the resulting text in my clipboard is this:

flatShading:true;transparent:true;color:#F16745

Proposed solution: Can we add spaces between the : and ; delimiters so it's more readable?

I was thinking perhaps actually the output should contain the originating parent Component, like so:

material="flatShading: true; transparent: true; color: #F16745"

But, then I realised that a developer may accidentally replace the other properties in the Component that weren't included


Problem: Without modifying any values, if I select an entity and immediately press its click html button, the Inspector thinks I modified the colour and this appears in my clipboard:

color:#F16745

Proposed solution: Fix whatever's causing color to think it's been changed.

dmarcos commented 7 years ago

We should rename Copy HTML to Copy Attribute and the string result should be:

geometry="primitive: cylinder; height: 2"

This way you can just copy and past in your html