KineticJS icon indicating copy to clipboard operation
KineticJS copied to clipboard

KineticJS(v4.4.0) not working in FF and IE 10

Open Corandy opened this issue 13 years ago • 4 comments

My program works perfectly in Chrome, but with FF and IE my canvasses are gone.

The error I got with Firefox is:

SyntaxError: An invalid or illegal string was specified: ...][c].apply(this[b],args)}})(c)}}(),function(){Kinetic.Filters.Grayscale=function... On kineticJS.js (line 28)

The error I got with IE is:

SCRIPT5022: SyntaxError h.addColorStop(g[i],g[i+1]) on kineticJS.js, line 28 character 7356

Corandy avatar Apr 19 '13 14:04 Corandy

Everything seems to be running great in FF and IE for me. Can you please post your working code into a jsfiddle so I can take a look there? I also need to know exactly at what point things are breaking. It's likely an implementation issue since no one else has reported problems like this.

ericdrowell avatar Apr 19 '13 15:04 ericdrowell

Thanks for the fast reply, I have Discovered that it worked properly on the earlier versions where 2 different things weren't combined yet. It's a huge lap of code. I will investigate a little more for a more specific information.

Corandy avatar Apr 22 '13 07:04 Corandy

@ericdrowell When I use fill: 'white' instead of

                                    fillRadialGradientStartPoint: 0,
                fillRadialGradientStartRadius: 0,
                fillRadialGradientEndPoint: 0,
                fillRadialGradientEndRadius: 800,
                fillRadialGradientColorStops: [0, '#262834', 1, '0f1114'],

That is placed in 'background' Rect that scales with the browserheight I got no erros in IE 10, 9 and FF.

But why is it happen only with fillRadialGradient and only in IE and FF? It has a connection with the error I mentioned before:

h.addColorStop(g[i],g[i+1]) on kineticJS.js, line 28 character 7356

What it makes more strange is that I have another object with radialgradientfill which works fine in FF and IE.

var lichtrondje = new Kinetic.Circle({ x: 0, y: 0, radius: 90, fillRadialGradientStartPoint: 0, fillRadialGradientStartRadius: 0, fillRadialGradientEndPoint: 0, fillRadialGradientEndRadius: 90, fillRadialGradientColorStops: [0, '#DDD', 1, 'rgba(0,0,0, 0.0)'], opacity: 1, id: 'lichtrondje' + x, name: 'lichtrondje' });

I have found out that the result looks different between the Chrome version and the FF and IE version. The right one is what its intended.

error

Corandy avatar Apr 22 '13 14:04 Corandy

The bug was that i forgot to have a '#' sign in the fillRadialGradientColorStops array. Chrome was less strict in it (making it more confusing) Thanks Eric for the help on stackoverflow!

Corandy avatar Apr 24 '13 07:04 Corandy