andreyz30001 / flashcanvas

Automatically exported from code.google.com/p/flashcanvas
0 stars 0 forks source link

FlashCanvas.net (pro and free) does not work with thejit.org library #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Extract directory from zip
2. Open example2.html in chrome and IE and compare.  This actually works 
fine using excanvas

What is the expected output? What do you see instead?
Same as chrome and excanvas

What version of the product are you using? On what operating system?
Latest 1.1 I think??

Please provide any additional information below.

I found this issue when testing my system using flashcanvas.  Performance 
is great compared to excanvas so good work there.  The attached example is 
slightly modified version of jit.js (found at thejit.org) to allow dynamic 
creation of flashcanvas.

I did not try going through the code bases to see what the problem could be 
as I don't have the time right now but hopefully you can find it easily.  I 
highly doubt this is a jit.js as this works in native canvas and excanvas.  
However there is hack code for excanvas on line 643 of jit.org.  You can 
see that I have added the same hack to get it working with flashcanvas.

Feel free to email me if you have more questions

guido.tapia@picnet.com.au

Thanks

Guido

Original issue reported on code.google.com by guido.tapia@gmail.com on 25 Mar 2010 at 9:01

Attachments:

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Thank you for your feedback. Since I'm away on business now, I will check your 
code
next week.

I'm considering preparing excanvas-compatible APIs to reduce such problems. For
example, the current version of FlashCanvas implements initElement() function 
and
exports it as FlashCanvas.initElement() method. So I will export this function 
also
as G_vmlCanvasManager.initElement().

Original comment by revu...@gmail.com on 26 Mar 2010 at 7:11

GoogleCodeExporter commented 8 years ago
I have implemented excanvas-compatible APIs in FlashCanvas. By using 
FlashCanvas Pro
1.2 beta2 or later, you can make jit.js work without modification.

http://flashcanvas.net/archive/FlashCanvasPro-1.2beta2.zip

Although I made the same improvements in free edition of FlashCanvas, jit.js 
did not
work with that version of FlashCanvas for some unknown reason. I'll investigate 
a
little further when I have time to spare.

Original comment by revu...@gmail.com on 30 Mar 2010 at 3:20

GoogleCodeExporter commented 8 years ago
I got this error when trying to use new flashcanvas.js:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; WOW64; 
Trident/4.0;
.NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Tue, 30 Mar 2010 23:41:42 UTC

Message: Object doesn't support this property or method
Line: 25
Char: 56
Code: 0
URI: http://localhost/.../flashcanvas.js

Original comment by guido.tapia@gmail.com on 30 Mar 2010 at 11:42

GoogleCodeExporter commented 8 years ago
The error "Object doesn't support..." is fixed in FlashCanvas Pro 1.2 beta3.

http://flashcanvas.net/archive/FlashCanvasPro-1.2beta3.zip

Original comment by revu...@gmail.com on 5 Apr 2010 at 10:05

GoogleCodeExporter commented 8 years ago
If you use Flash Player 10.1 or free edition of FlashCanvas, you'll probably 
need to apply the following patch to jit.js.

{{{
--- jit.js.orig
+++ jit.js
@@ -704,6 +704,9 @@
         get(opt.injectInto).appendChild(mainContainer);

         //create contexts
+        if (typeof FlashCanvas != "undefined") {
+            FlashCanvas.initElement(canvas);
+        }
         ctx = canvas.getContext('2d');
         translateToCenter(canvas, ctx);
         var st = opt.styles;
}}}

I don't understand the exact reason why this patch is needed, but in my case, 
it works well.

Original comment by revu...@gmail.com on 15 Jun 2010 at 9:25

GoogleCodeExporter commented 8 years ago
I updated the patch. The previous patch didn't take into consideration the 
backgroundCanvas of jit.js.

--- jit.js.orig
+++ jit.js
@@ -704,6 +704,9 @@
         get(opt.injectInto).appendChild(mainContainer);

         //create contexts
+        if (typeof FlashCanvas != "undefined") {
+            FlashCanvas.initElement(canvas);
+        }
         ctx = canvas.getContext('2d');
         translateToCenter(canvas, ctx);
         var st = opt.styles;
@@ -711,6 +714,9 @@
         for (s in st)
             ctx[s] = st[s];
         if (bc) {
+            if (typeof FlashCanvas != "undefined") {
+                FlashCanvas.initElement(bkcanvas);
+            }
             bkctx = bkcanvas.getContext('2d');
             st = bc.styles;
             for (s in st) {

Original comment by revu...@gmail.com on 16 Jun 2010 at 9:10