To add more, I am debugging through this code which uses the HTMLCanvasElement . This code is painting in the dimensions of the given DIV id, which... if the canvas HEIGHT is a large number the paint function fails. Only in Firefox. I can hard-code the value for canvas.height to something like 600, and the painting works fine. So refining my question, wondering if there is an issue with HTML Canvas in firefox... One height failing is 45500 , the calling plugin is at the bottom of this response (marked 'Failing')
Thanks, I'll just keep updating this if on one answers, at least in case someone else comes across this in the future. RELEVANT FUNCTIONS ------------------------------------ CALLING FUNCTION var checkResize = function(container, force) { var $container = $(container); var data = $container.data('liquid-canvas'); if (!data) return; var canvas = data.canvas; var $canvas = $(canvas); var w = $container.outerWidth(); var h = $container.outerHeight(); var x = $container.offset().left; var y = $container.offset().top; if (force || canvas.width != w || canvas.height != h || $canvas.offset().top != y || $canvas.offset().left != x) { pollCounter = 100; $canvas.css($container.offset()); canvas.width = w; canvas.height = h;//20000; var area = new Area(canvas); area.save(); alert (area.height); data.paint(area); area.restore(); } }; //PAINT PLUGIN CALLS PLUGINS FOR PAINTING var pluginFromPlugins = function(plugins) { return newPlugin({ paint: function(area) { area.save(); this.action.opts = $.extend(true, this.action.savedOpts); $.each(plugins, function() { this.paint(area); }); area.restore(); }, setAction: function(action) { this.action = action; // should call super if it existed ... $.each(plugins, function() { this.action = action; }); } }); }; //PLUGIN WHICH FAILS $.registerLiquidCanvasPlugin({ name: "rect", paint: function(area) { area.ctx.beginPath(); area.ctx.rect(0, 0, area.width, area.height); area.ctx.closePath(); if (this.action) this.action.paint(area); // for chaining // THIS LINE FAILS } }); On Apr 3, 11:50 am, hassafrass <emma.ir...@gmail.com> wrote: > Hi, > > I posted a message here last week about an issue I am having with this > jquery set of plugins: > > http://www.ruzee.com/content/liquid-canvas > > The effects (on a div) work perfectly in IE 6/IE 7 and in Firefox > EXCEPT when the div is very long. IN this case it fails with the > error: > > reference to undefined property jQuery.cache[id][name] (line of > jquery-1.3.2.js) > > Now from John Resig I understand this error is a known issue with > Firefox Strict and will be addressed (about:config , > javascript.options.strict) . But, when I turn of this option liquid > canvas still fails, and I have come to understand that the issue is > not so much with jQuery, but that jQuery throws the above error when > it doesn't receive what it is expecting (I believe an empty reference > in this case). > > So here is where I am. I have strict turned off, and I am trying to > debug this problem which occurs just in Firefox still. I have done a > lot of JavaScript over the years, and I am fairly new to jQuery > although I am learning quickly I am having a hell of a time debugging > this. > > Are there any tips suggestions etc for debugging jquery when no error > is returned? Not in Firebug - just silent failing... Right now I am > doing 'alerts' all over the place trying to find a place of failure > but arghhh. WHy Firefox now if strict is turned off? Are there any > jquery quirks with Firefox and Div/element height? > > Thanks for any input. > > Original > Post:http://groups.google.com/group/jquery-dev/browse_thread/thread/987fe4... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---