OSDN Git Service

new Function 中から呼ばれる関数やプロパティは固定文字列で結び付けておく(ADVANCED_OPTIMIZATION 対応)
authorYoshihiro Yamazaki <yoya@awm.jp>
Sun, 30 Dec 2012 15:24:59 +0000 (00:24 +0900)
committerYoshihiro Yamazaki <yoya@awm.jp>
Sun, 30 Dec 2012 15:24:59 +0000 (00:24 +0900)
src/canvas.js
src/loader.js

index 55bbf79..dd9741c 100644 (file)
@@ -7,7 +7,7 @@ goog.scope(function() {
  */
 FlappCanvas = function(canvas) {
     this.canvas = canvas;
-    this.ctx = canvas.getContext('2d');
+    this['ctx'] = this.ctx = canvas.getContext('2d'); // for closure compilre
 };
 
 FlappCanvas.prototype = {
index 1c85ef1..f2009b1 100644 (file)
@@ -86,7 +86,7 @@ FlappLoader.prototype = {
                 var jpeg = FlappBitmap.toJpeg(tag.jpegData, jpegTables);
                 var image = new Image();
                 image.src = "data:image/jpeg;base64," + goog.global.btoa(jpeg);
-                tag.image = image;
+               tag['image'] = tag.image = image; // for closure compilre
                 dict.set(tag.id, tag);
                 break;
             case 8: // JPEGTables