浏览代码

add noplugin_href

David Rose 15 年之前
父节点
当前提交
4a637d0beb
共有 1 个文件被更改,包括 15 次插入3 次删除
  1. 15 3
      direct/src/directscripts/RunPanda3D.js

+ 15 - 3
direct/src/directscripts/RunPanda3D.js

@@ -41,12 +41,19 @@ function P3D_Generateobj(objAttrs, params, embedAttrs, imageAttrs)
     str += '> ';
     str += '> ';
   }
   }
   if (imageAttrs["src"]) {
   if (imageAttrs["src"]) {
+    if (imageAttrs["href"]) {
+      str += '<a href="' + imageAttrs["href"] + '">';
+    }
     str += '<img ';
     str += '<img ';
-    for (var i in imageAttrs)
-    {
-      str += i + '="' + imageAttrs[i] + '" ';
+    for (var i in imageAttrs) {
+      if (i != "href") {
+        str += i + '="' + imageAttrs[i] + '" ';
+      }
     }
     }
     str += '>';
     str += '>';
+    if (imageAttrs["href"]) {
+      str += '</a>';
+    }
   }
   }
   str += '</object>';
   str += '</object>';
 
 
@@ -84,6 +91,11 @@ function P3D_GetArgs(args, classid, mimeType){
 
 
     case "noplugin_img":
     case "noplugin_img":
         ret.imageAttrs["src"] = args[i+1];
         ret.imageAttrs["src"] = args[i+1];
+        ret.imageAttrs["border"] = '0';
+        break;
+
+    case "noplugin_href":
+        ret.imageAttrs["href"] = args[i+1];
         break;
         break;
 
 
     case "splash_img":
     case "splash_img":