ライブラリ更新
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4094 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
1c8589c251
commit
507295e46b
@ -18,7 +18,7 @@
|
|||||||
window.addEventListener('DOMContentLoaded', function() {
|
window.addEventListener('DOMContentLoaded', function() {
|
||||||
window.removeEventListener('DOMContentLoaded', arguments.callee, true);
|
window.removeEventListener('DOMContentLoaded', arguments.callee, true);
|
||||||
|
|
||||||
const currentRevision = 5;
|
const currentRevision = 6;
|
||||||
var root = document.documentElement;
|
var root = document.documentElement;
|
||||||
|
|
||||||
var loadedRevision = root.getAttribute('fullScreenCanvas');
|
var loadedRevision = root.getAttribute('fullScreenCanvas');
|
||||||
@ -34,17 +34,34 @@ window.addEventListener('DOMContentLoaded', function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
window.fullScreenCanvas = {
|
window.fullScreenCanvas = {
|
||||||
show : function()
|
show : function(aTargetElement)
|
||||||
{
|
{
|
||||||
var color = '-moz-field';
|
var color = '-moz-field';
|
||||||
var canvas = this.canvas;
|
var canvas = this.canvas;
|
||||||
if (!canvas) return;
|
if (!canvas) return;
|
||||||
|
|
||||||
var w = window.innerWidth;
|
var rootBox = document.documentElement.boxObject;
|
||||||
var h = window.innerHeight;
|
var canvasW = window.innerWidth;
|
||||||
canvas.style.width = (canvas.width = w)+'px';
|
var canvasH = window.innerHeight;
|
||||||
canvas.style.height = (canvas.height = h)+'px';
|
|
||||||
canvas.style.top = canvas.style.left = 0;
|
var x, y, w, h;
|
||||||
|
if (aTargetElement && aTargetElement.ownerDocument == document) {
|
||||||
|
var box = aTargetElement.boxObject;
|
||||||
|
y = box.screenY - rootBox.screenY;
|
||||||
|
x = box.screenX - rootBox.screenX;
|
||||||
|
w = box.width;
|
||||||
|
h = box.height;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
x = y = 0;
|
||||||
|
w = canvasW;
|
||||||
|
h = canvasH;
|
||||||
|
}
|
||||||
|
|
||||||
|
canvas.style.left = 0;
|
||||||
|
canvas.style.top = 0;
|
||||||
|
canvas.style.width = (canvas.width = canvasW)+'px';
|
||||||
|
canvas.style.height = (canvas.height = canvasH)+'px';
|
||||||
canvas.style.zIndex = 65000;
|
canvas.style.zIndex = 65000;
|
||||||
var frame = this.frame;
|
var frame = this.frame;
|
||||||
if (frame) {
|
if (frame) {
|
||||||
@ -53,9 +70,10 @@ window.addEventListener('DOMContentLoaded', function() {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
var ctx = canvas.getContext('2d');
|
var ctx = canvas.getContext('2d');
|
||||||
ctx.clearRect(0, 0, w, h);
|
ctx.clearRect(0, 0, canvasW, canvasH);
|
||||||
ctx.save();
|
ctx.save();
|
||||||
ctx.drawWindow(window, 0, 0, w, h, color);
|
ctx.translate(x, y);
|
||||||
|
ctx.drawWindow(window, x, y, w, h, color);
|
||||||
ctx.restore();
|
ctx.restore();
|
||||||
|
|
||||||
var browsers = this.browsers;
|
var browsers = this.browsers;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user