content-loader icon indicating copy to clipboard operation
content-loader copied to clipboard

Raw content-loader not working

Open bjornharvold opened this issue 4 years ago • 6 comments

Upgraded to Angular 11

facebook, list and bullets components work but not raw.

Sample project attached. test-hammer.zip

bjornharvold avatar Nov 13 '20 05:11 bjornharvold

Try setting viewbox property value, for example with value [viewBox]="'0 0 800 100'". You can't see the svg because default value for this property is '0 0 0 0'. The other components works ok because they implement <content-loader> in their templates with the viewBox property setted. @NetanelBasal maybe setting viewBox property to null instead of '0 0 0 0' by default could solve this.

sachicortes avatar Nov 18 '20 00:11 sachicortes

I just came here looking for the same thing. Adding the viewbox input seems to work. So like this...

 <content-loader [viewBox]="'0 0 800 100'">
     <svg:rect x="0" y="0" rx="3" ry="3" width="100%" height="10" />
      <svg:rect x="20" y="20" rx="3" ry="3" width="80%" height="10" />
      <svg:rect x="20" y="40" rx="3" ry="3" width="70%" height="10" />
      <svg:rect x="0" y="60" rx="3" ry="3" width="100%" height="10" />
      <svg:rect x="20" y="80" rx="3" ry="3" width="80%" height="10" />
      <svg:rect x="20" y="100" rx="3" ry="3" width="70%" height="10" />
 </content-loader>

This @sachicortes

scottpetrovic avatar Dec 04 '20 14:12 scottpetrovic

Is this a bug / feature and the docs need updating? Should I resolve this issue?

bjornharvold avatar Dec 05 '20 01:12 bjornharvold

It is a bug/misconfig of the package. As I stated in my answer viewBox default value is 0 0 0 0 and should be null or other value.

sachicortes avatar Dec 05 '20 17:12 sachicortes

@sachicortes you're welcome to submit a PR.

NetanelBasal avatar Dec 05 '20 17:12 NetanelBasal

@NetanelBasal will do, thanks for all the packages and info out there btw

sachicortes avatar Dec 05 '20 17:12 sachicortes