Commit 8ad58f1a by Masaru Abe

textObject.jsリファクタリング

parent 1da5c4e9
......@@ -5,10 +5,13 @@
* Copyright (C) Agentec Co, Ltd. All rights reserved.
*/
//グローバルの名前空間用のオブジェクトを用意する
var TEXTOBJECT = {};
/**
* get HTML Text Image URL
*/
function getTextObjectImage(width, height, htmlData) {
TEXTOBJECT.getTextObjectImage = function(width, height, htmlData) {
var canvas = document.createElement('canvas');
canvas.width = width;
......
......@@ -645,7 +645,7 @@ object3d.prototype = new PageObject();
/* mediaType = 7 write text object*/
var text = function (mediaType, actionType, id, x, y, w, h, visible, actionFunction, content, objectId) {
//var imageUrl = displayText(x,y,w,h,id,content);
var imageUrl = getTextObjectImage(w, h, content);
var imageUrl = TEXTOBJECT.getTextObjectImage(w, h, content);
this.setup(mediaType, actionType, id, imageUrl, x, y, w, h, visible, actionFunction, null, objectId);
this.action = function () {
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment