vue-lottie icon indicating copy to clipboard operation
vue-lottie copied to clipboard

Error: <svg> attribute viewBox: Expected number, "0 0..

Open wrabit opened this issue 6 years ago • 27 comments

Setting up as per the example and getting:

Error: attribute viewBox: Expected number, "0 0 undefined undefi…

Any ideas?

wrabit avatar Oct 13 '18 20:10 wrabit

Same problem .. i did exactly the same as the example and always have this error...

Sweetyy avatar Oct 18 '18 14:10 Sweetyy

should be animationData: animationData.default

patrick-sung avatar Oct 23 '18 17:10 patrick-sung

should be animationData: animationData.default

Thanks a lot ! It works for me now :)

Sweetyy avatar Oct 24 '18 07:10 Sweetyy

damn me to! frigg! thanks github!

sebbean avatar Dec 16 '18 23:12 sebbean

It works for me too. Thanks! I want to know the reason is 'lottie-web' version upgrade?

Xiaoha0226 avatar Jan 03 '19 08:01 Xiaoha0226

@patrick-sung you saved me from something that's been blocking me the entire day. THANK YOU! 😭

seemcat avatar Jan 10 '19 23:01 seemcat

OMG. WHY THIS ISN'T IN THE DOCUMENTATION.

I literally wasted half of the day..

ZalgirisKaunas avatar Feb 21 '19 11:02 ZalgirisKaunas

Yeah, had the same problem, please update the doc, I would never have figured out by myself if @patrick-sung didn't reveal the trick

lansolo99 avatar Mar 10 '19 14:03 lansolo99

How can I find this in the Lottie doc?

TimRChen avatar Mar 18 '19 02:03 TimRChen

Ow please update the documentation( https://github.com/chenqingspring/vue-lottie/blob/master/README.md#L65 ) for animationData.default please!

alexsandro-xpt avatar Apr 19 '19 16:04 alexsandro-xpt

Thanks @patrick-sung, was stuck on this for over an hour!

dhruvbhatia7 avatar Apr 23 '19 12:04 dhruvbhatia7

Thx so much

should be animationData: animationData.default

Very thx! Save my day!

jeancabral avatar May 29 '19 13:05 jeancabral

should be animationData: animationData.default

thanks a lottie!!!

carlossrb avatar Aug 02 '19 01:08 carlossrb

should be animationData: animationData.default

thanks for your help,

cmdparkour avatar Dec 08 '19 08:12 cmdparkour

should be animationData: animationData.default

so cool

Xiaoshizaizi avatar Dec 20 '19 11:12 Xiaoshizaizi

After

should be animationData: animationData.default

Finally, thanks ya,,, anyone tell me why it's not working as the documentation...

DevidJoshua avatar May 20 '20 08:05 DevidJoshua

After

should be animationData: animationData.default

Finally, thanks ya,,, anyone tell me why it's not working as the documentation...

Good question. But seems like it will not be fixed.

pitometsyurii avatar Jun 13 '20 14:06 pitometsyurii

Could also change how it's imported:

- import * as animationData from './planets-spinning.json'
+ import animationData from './planets-spinning.json'

This way you don't have to get animationData.default as it automatically imports the default.

yehee avatar Jul 15 '20 02:07 yehee

2 years later and the documentation still needs updating :(

There are even PRs for it: https://github.com/chenqingspring/vue-lottie/pull/40 https://github.com/chenqingspring/vue-lottie/pull/42 https://github.com/chenqingspring/vue-lottie/pull/51

@chenqingspring please update? :)

cazroam avatar Aug 13 '20 04:08 cazroam

Could also change how it's imported:

- import * as animationData from './planets-spinning.json'
+ import animationData from './planets-spinning.json'

This way you don't have to get animationData.default as it automatically imports the default.

Sensacional!!! Uffaaaa.. ja tava desistindo.. Valeu demais!

freddymais avatar Dec 10 '20 00:12 freddymais

@patrick-sung god

subodhk01 avatar Feb 01 '21 18:02 subodhk01

Update the docs!!!

jackdewhurst avatar Feb 20 '21 08:02 jackdewhurst

should be animationData: animationData.default

nice

anearseeyou avatar Jun 29 '21 10:06 anearseeyou

what about Typescript? it's not happy with that saying Property 'default' does not exist on type '{ v: string; fr: number; ip: number; op: number; w: number; h: number; nm: string; ddd: number; assets: ({ id: string;

vitpankin avatar Jul 22 '21 14:07 vitpankin

Yeah, for TypeScript it's better to do import { default as animationData } from '../animation-with-blackjack-and-hooks.json' and then

const defaultOptions:Options = { loop: true, autoplay: true, animationData: animationData, rendererSettings: { preserveAspectRatio: 'xMidYMid slice' } };

vitpankin avatar Jul 22 '21 14:07 vitpankin

should be animationData: animationData.default

where add this?

wbdservices avatar Jul 17 '23 10:07 wbdservices

should be animationData: animationData.default

where should i add this

raheesm avatar Jul 30 '23 12:07 raheesm