[Sugar-devel] [Karma] a possible bug in jquery.karma.js
Felipe López Toledo
zer.subzero at gmail.com
Sun Sep 6 21:30:33 EDT 2009
:|
yep, that is a bug
the problem is this line: this.container.appendChild( this.canvas );
from what I understand this if block is supposed to get you the context
> of canvas that is already in the DOM. The this.container.appendChild(..)
> adds a new canvas element w/ the same ID. Is this what you intend?
>
no!, my intention was to add the previously created canvas element as a
child of the specified container, this is useful if are not using inline
canvas declaration...
this line must me inside the "if block" around line 627
thanks for reporting the bug.
btw. should we use launchpad.net fro reporting bugs?
2009/9/4 Bryan Berry <bryan at olenepal.org>
> Felipe,
>
> on line 636 of jquery.karma.js
>
> http://git.sugarlabs.org/projects/karma/repos/mainline/blobs/master/js/jquery.karma.js#line636
>
> if ( this.canvas.getContext ) {
> this.ctx = this.canvas.getContext("2d");
> this.container.appendChild( this.canvas );
> }
>
> from what I understand this if block is supposed to get you the context
> of canvas that is already in the DOM. The this.container.appendChild(..)
> adds a new canvas element w/ the same ID. Is this what you intend?
>
> It produces a result that is not why expected. My drawing operations
> happen in an area completely unrelated to my actual canvas.
>
>
>
> --
> Bryan W. Berry
> Technology Director
> OLE Nepal, http://www.olenepal.org
>
>
--
Felipe López Toledo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sugarlabs.org/archive/sugar-devel/attachments/20090906/4881c107/attachment.htm
More information about the Sugar-devel
mailing list