クリックイベントの再送の準備

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@5524 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2009-12-17 06:29:33 +00:00
parent 56aff86c7e
commit 9656599a03

View File

@ -37,7 +37,7 @@ window.addEventListener('DOMContentLoaded', function() {
window.fullScreenCanvas = { window.fullScreenCanvas = {
show : function(aTargetElement, aCallback, aThis) show : function(aTargetElement, aCallback, aThis)
{ {
this.showInternal(aTargetElement); this.doShow(aTargetElement);
if (!aCallback) return; if (!aCallback) return;
if (this.shown) { if (this.shown) {
var self = this; var self = this;
@ -50,7 +50,7 @@ window.addEventListener('DOMContentLoaded', function() {
aCallback.call(aThis || window); aCallback.call(aThis || window);
} }
}, },
showInternal : function(aTargetElement) doShow : function(aTargetElement)
{ {
if (this.shown) return; if (this.shown) return;
@ -184,6 +184,11 @@ window.addEventListener('DOMContentLoaded', function() {
this.shown = false; this.shown = false;
}, },
onClick : function(aEvent)
{
this.hide();
},
get browsers() get browsers()
{ {
browsers = [].concat(Array.slice(document.getElementsByTagName('tabbrowser'))) browsers = [].concat(Array.slice(document.getElementsByTagName('tabbrowser')))
@ -197,7 +202,8 @@ window.addEventListener('DOMContentLoaded', function() {
return document.getElementById('fullScreenCanvas-panel'); return document.getElementById('fullScreenCanvas-panel');
}, },
init : function() { init : function()
{
var canvas = document.createElementNS('http://www.w3.org/1999/xhtml', 'canvas'); var canvas = document.createElementNS('http://www.w3.org/1999/xhtml', 'canvas');
canvas.setAttribute('id', 'fullScreenCanvas-canvas'); canvas.setAttribute('id', 'fullScreenCanvas-canvas');
canvas.setAttribute('width', '0'); canvas.setAttribute('width', '0');
@ -207,7 +213,8 @@ window.addEventListener('DOMContentLoaded', function() {
this.panel.appendChild(canvas); this.panel.appendChild(canvas);
}, },
destroy : function() { destroy : function()
{
var range = document.createRange(); var range = document.createRange();
range.selectNodeContents(this.panel); range.selectNodeContents(this.panel);
range.deleteContents(); range.deleteContents();
@ -233,7 +240,7 @@ window.addEventListener('DOMContentLoaded', function() {
border: 0 none; border: 0 none;
padding: 0; padding: 0;
" "
onclick="fullScreenCanvas.hide();"/> onclick="fullScreenCanvas.onClick(event);"/>
</window> </window>
</overlay> </overlay>