| 1 |
function tableToCanvas (table, parent) { |
function tableToCanvas (table, parent, idPrefix) { |
| 2 |
var canvas = document.createElement ('canvas'); |
var canvas = document.createElement ('canvas'); |
| 3 |
parent.appendChild (canvas); |
parent.appendChild (canvas); |
| 4 |
if (window.G_vmlCanvasManager) { |
if (window.G_vmlCanvasManager) { |
| 142 |
area.shape = 'rect'; |
area.shape = 'rect'; |
| 143 |
area.coords = [x, y, x + width, y + height].join (','); |
area.coords = [x, y, x + width, y + height].join (','); |
| 144 |
area.alt = 'Cell (' + c[0].x + ', ' + c[0].y + ')'; |
area.alt = 'Cell (' + c[0].x + ', ' + c[0].y + ')'; |
| 145 |
area.href = '#node-' + c[0].id; |
area.href = '#' + idPrefix + 'node-' + c[0].id; |
| 146 |
area.id = 'cell-' + c[0].id; |
area.id = idPrefix + 'cell-' + c[0].id; |
| 147 |
map.appendChild (area); |
map.appendChild (area); |
| 148 |
} |
} |
| 149 |
} else { |
} else { |
| 176 |
} |
} |
| 177 |
|
|
| 178 |
if (map.hasChildNodes ()) { |
if (map.hasChildNodes ()) { |
| 179 |
var mapid = 'table-map-' + ++document.TableMapId; |
var mapid = /* idPrefix + */ 'table-map-' + ++document.TableMapId; |
| 180 |
map.name = mapid; |
map.name = mapid; |
| 181 |
parent.appendChild (map); |
parent.appendChild (map); |
| 182 |
var img = document.createElement ('img'); |
var img = document.createElement ('img'); |
| 191 |
|
|
| 192 |
/* |
/* |
| 193 |
|
|
| 194 |
Copyright 2007 Wakaba <w@suika.fam.cx> |
Copyright 2007-2008 Wakaba <w@suika.fam.cx> |
| 195 |
|
|
| 196 |
This library is free software; you can redistribute it |
This library is free software; you can redistribute it |
| 197 |
and/or modify it under the same terms as Perl itself. |
and/or modify it under the same terms as Perl itself. |